ncbo / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
15 stars 6 forks source link

Allow 'find' to use id fragments for lookup #35

Closed palexander closed 11 years ago

palexander commented 11 years ago

We will need to support lookups based on the last fragment of an id IRI. For example:

# This works
Ontology.find("http://blah.org/ontologies/snomed")

# So should this
Ontology.find("snomed")
msalvadores commented 11 years ago

Apparently this was already implemented. From test_model_find ...

white = Color.find("white")
assert_instance_of Color, white
assert white.resource_id.value.end_with? "white"
assert_equal "white", white.code