RDF.Statement.coerce
You're seeing just the function
coerce
, go back to RDF.Statement module for more information.
Specs
coerce(coercible_t(), RDF.PropertyMap.t() | nil) :: RDF.Triple.t() | RDF.Quad.t()
Creates a RDF.Statement
tuple with proper RDF values.
An error is raised when the given elements are not coercible to RDF values.
Examples
iex> RDF.Statement.coerce {"http://example.com/S", "http://example.com/p", 42}
{~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42)}
iex> RDF.Statement.coerce {"http://example.com/S", "http://example.com/p", 42, "http://example.com/Graph"}
{~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42), ~I<http://example.com/Graph>}