Module: ActiveTriples::Reflection::ClassMethods
- Defined in:
- lib/active_triples/reflection.rb
Instance Method Summary collapse
-
#has_property?(property) ⇒ Boolean
True if the property exsits; false otherwise.
-
#properties ⇒ Hash{String=>ActiveTriples::NodeConfig}
A hash of property names and their configurations.
-
#properties=(val) ⇒ Hash{String=>ActiveTriples::NodeConfig}
A hash of property names and their configurations.
-
#reflect_on_property(property) ⇒ ActiveTriples::NodeConfig
The configuration for the property.
Instance Method Details
#has_property?(property) ⇒ Boolean
Returns true if the property exsits; false otherwise.
64 65 66 |
# File 'lib/active_triples/reflection.rb', line 64 def has_property?(property) _active_triples_config.keys.include? property.to_s end |
#properties ⇒ Hash{String=>ActiveTriples::NodeConfig}
Returns a hash of property names and their configurations.
47 48 49 |
# File 'lib/active_triples/reflection.rb', line 47 def properties _active_triples_config end |
#properties=(val) ⇒ Hash{String=>ActiveTriples::NodeConfig}
Returns a hash of property names and their configurations.
56 57 58 |
# File 'lib/active_triples/reflection.rb', line 56 def properties=(val) self._active_triples_config = val end |
#reflect_on_property(property) ⇒ ActiveTriples::NodeConfig
Returns the configuration for the property.
38 39 40 41 42 |
# File 'lib/active_triples/reflection.rb', line 38 def reflect_on_property(property) _active_triples_config.fetch(property.to_s) do raise ActiveTriples::UndefinedPropertyError.new(property.to_s, self) end end |