Module: Gearbox::SemanticAccessors::InstanceMethods
- Defined in:
- lib/gearbox/mixins/semantic_accessors.rb
Instance Method Summary collapse
-
#initialize(obj = nil) ⇒ Object
An initialization strategy for all occasions.
-
#rdf_collection ⇒ Object
We collect triples inside the models in order to query them, filter them and handle the bridge between domain models and the graph we’re building.
- #subject ⇒ Object
Instance Method Details
#initialize(obj = nil) ⇒ Object
An initialization strategy for all occasions.
91 92 93 94 95 96 97 98 |
# File 'lib/gearbox/mixins/semantic_accessors.rb', line 91 def initialize(obj=nil) case obj when Hash merge_hash_values(obj) when RDFCollection merge_rdf_collection(obj) end end |
#rdf_collection ⇒ Object
We collect triples inside the models in order to query them, filter them and handle the bridge between domain models and the graph we’re building.
82 83 84 |
# File 'lib/gearbox/mixins/semantic_accessors.rb', line 82 def rdf_collection @rdf_collection ||= RDFCollection.new end |
#subject ⇒ Object
86 87 88 |
# File 'lib/gearbox/mixins/semantic_accessors.rb', line 86 def subject "1" end |