RDF.Description.get
You're seeing just the function
get
, go back to RDF.Description module for more information.
Specs
get(t(), RDF.Statement.coercible_predicate(), any()) :: [RDF.Statement.object()] | any()
Gets the objects for the given predicate of a Description.
When the predicate can not be found, the optionally given default value or nil
is returned.
Examples
iex> RDF.Description.new(EX.S, init: {EX.P, EX.O}) |> RDF.Description.get(EX.P)
[RDF.iri(EX.O)]
iex> RDF.Description.new(EX.S) |> RDF.Description.get(EX.foo)
nil
iex> RDF.Description.new(EX.S) |> RDF.Description.get(EX.foo, :bar)
:bar