Class: NSConnector::SubListItem
- Inherits:
-
Object
- Object
- NSConnector::SubListItem
- Includes:
- FieldStore
- Defined in:
- lib/ns_connector/sublist_item.rb
Overview
Represents one SubListItem under a Resource
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#store ⇒ Object
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize(name, fields, parent, upstream_store = nil) ⇒ SubListItem
constructor
A new instance of SubListItem.
- #inspect ⇒ Object
- #to_hash ⇒ Object
Methods included from FieldStore
Constructor Details
#initialize(name, fields, parent, upstream_store = nil) ⇒ SubListItem
Returns a new instance of SubListItem.
12 13 14 15 16 17 18 19 20 |
# File 'lib/ns_connector/sublist_item.rb', line 12 def initialize name, fields, parent, upstream_store = nil upstream_store.stringify_keys! if upstream_store @store = (upstream_store || {}) @parent = parent @fields = fields @name = name create_store_accessors! end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
10 11 12 |
# File 'lib/ns_connector/sublist_item.rb', line 10 def fields @fields end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/ns_connector/sublist_item.rb', line 9 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
8 9 10 |
# File 'lib/ns_connector/sublist_item.rb', line 8 def parent @parent end |
#store ⇒ Object
Returns the value of attribute store.
7 8 9 |
# File 'lib/ns_connector/sublist_item.rb', line 7 def store @store end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/ns_connector/sublist_item.rb', line 22 def inspect "#<NSConnector::#{self.class}:#{name}>" end |
#to_hash ⇒ Object
26 27 28 |
# File 'lib/ns_connector/sublist_item.rb', line 26 def to_hash @store end |