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

Return instance of Object when calling object.load #60

Closed palexander closed 11 years ago

palexander commented 11 years ago

Right now, calling object.load returns a boolean (I think?). It would be really nice for chaining if you could call object.load and have the instance returned. Here's a use case:

ont = Ontology.find("SNOMED").load
latest = ont.latest_submission.load
palexander commented 11 years ago

This would probably be good for object.save as well, with object.delete returning nil. This assumes that all of these methods throw exceptions on failure (so the boolean isn't really needed)