Class: Hyperactive::Hash::Element
- Inherits:
-
Record::Bass
- Object
- Record::Bass
- Hyperactive::Hash::Element
- Includes:
- Cleaner::Accessors
- Defined in:
- lib/hyperactive/hash.rb
Overview
A wrapper class that knows what key, value and list_element belong together.
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#list_element ⇒ Object
Returns the value of attribute list_element.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value, list_element) ⇒ Element
constructor
Initialize a new Hash::Element with given
key
,value
andlist_element
.
Methods included from Cleaner::Accessors
append_features, #dirty?, #is_clean!, #is_dirty!
Methods included from Transactions::Accessors
Methods included from Index::Indexable
Methods included from Record::Persistent
#<=>, append_features, #create, #destroy!, #with_transaction
Constructor Details
#initialize(key, value, list_element) ⇒ Element
Initialize a new Hash::Element with given key
, value
and list_element
.
48 49 50 51 52 |
# File 'lib/hyperactive/hash.rb', line 48 def initialize(key, value, list_element) self.key = key self.value = value self.list_element = list_element end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
43 44 45 |
# File 'lib/hyperactive/hash.rb', line 43 def key @key end |
#list_element ⇒ Object
Returns the value of attribute list_element.
43 44 45 |
# File 'lib/hyperactive/hash.rb', line 43 def list_element @list_element end |
#value ⇒ Object
Returns the value of attribute value.
43 44 45 |
# File 'lib/hyperactive/hash.rb', line 43 def value @value end |