Class: Neography::PropertyContainer
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Neography::PropertyContainer
- Defined in:
- lib/neography/property_container.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#neo_id ⇒ Object
readonly
Returns the value of attribute neo_id.
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ PropertyContainer
constructor
A new instance of PropertyContainer.
Constructor Details
#initialize(hash = nil) ⇒ PropertyContainer
Returns a new instance of PropertyContainer.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/neography/property_container.rb', line 5 def initialize(hash=nil) @table = {} if hash @neo_id = hash["self"].split('/').last for k,v in hash["data"] @table[k.to_sym] = v new_ostruct_member(k) end end end |
Instance Attribute Details
#neo_id ⇒ Object (readonly)
Returns the value of attribute neo_id.
3 4 5 |
# File 'lib/neography/property_container.rb', line 3 def neo_id @neo_id end |