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

Leave vocab registration for just namespace (the rest to models) #19

Closed msalvadores closed 11 years ago

msalvadores commented 11 years ago

Reviews goes into the default namespace:

class Review
    attribute :name 
    attribute :name , { options }
end 

or in this second case the default namespace for Review is :other_ns. That ns is use by default by attributes unless stated otherwise in options:

class Review
    namespace :other_ns
    attribute :name 
    attribute :name , { options }
end 
msalvadores commented 11 years ago

Implemented in the new version of the model configuration. It can be settup like ...

class Review
  model :review, :namespace => :other_ns
  attribute :name 
end