Add RDF.IRI.in_namespace?/2 examples
This commit is contained in:
parent
b65d4b6bb7
commit
bafaf6332e
1 changed files with 9 additions and 0 deletions
|
@ -242,6 +242,15 @@ defmodule RDF.IRI do
|
|||
|
||||
@doc """
|
||||
Checks whether `iri` lies in `namespace`.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> RDF.IRI.in_namespace?(~I<http://example.com/foo>, ~I<http://example.com/>)
|
||||
true
|
||||
iex> RDF.IRI.in_namespace?(~I<http://example.com/foo/bar>, "http://example.com/")
|
||||
true
|
||||
iex> RDF.IRI.in_namespace?(~I<http://example.com/#foo>, EX)
|
||||
true
|
||||
"""
|
||||
@spec in_namespace?(t | module, String.t() | t | module) :: boolean
|
||||
def in_namespace?(iri, namespace)
|
||||
|
|
Loading…
Reference in a new issue