core: creating a description from another description just copies the predications

This commit is contained in:
Marcel Otto 2017-03-31 16:08:06 +02:00
parent fd3a20116b
commit a28f27133e

View file

@ -31,8 +31,8 @@ defmodule RDF.Description do
do: new(subject) |> add(predicate, objects)
def new(subject, statements) when is_list(statements),
do: new(subject) |> add(statements)
def new(subject, description = %RDF.Description{}),
do: new(subject) |> add(description)
def new(subject, %RDF.Description{predications: predications}),
do: %RDF.Description{new(subject) | predications: predications}
def new(subject, predications = %{}),
do: new(subject) |> add(predications)