Class: Hyperactive::Hash::Element
- Inherits:
-
Record::Bass
- Object
- Record::Bass
- Hyperactive::Hash::Element
- Defined in:
- lib/hyperactive/hash.rb
Overview
A wrapper class that knows what key, value and list_element belong together.
Constant Summary
Constants inherited from Record::Bass
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.
Attributes inherited from Record::Bass
Instance Method Summary collapse
-
#initialize(key, value, list_element) ⇒ Element
constructor
Initialize a new Hash::Element with given
key
,value
andlist_element
.
Methods inherited from Record::Bass
#<=>, attr_accessor, attr_reader, attr_writer, #create, create_hooks, #destroy!, destroy_hooks, find, get_instance, get_instance_with_transaction, index_by, #load_hook, load_hooks, reject, #save_hook, save_hooks, select, setup, #with_transaction
Constructor Details
#initialize(key, value, list_element) ⇒ Element
Initialize a new Hash::Element with given key
, value
and list_element
.
42 43 44 45 46 |
# File 'lib/hyperactive/hash.rb', line 42 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.
38 39 40 |
# File 'lib/hyperactive/hash.rb', line 38 def key @key end |
#list_element ⇒ Object
Returns the value of attribute list_element.
38 39 40 |
# File 'lib/hyperactive/hash.rb', line 38 def list_element @list_element end |
#value ⇒ Object
Returns the value of attribute value.
38 39 40 |
# File 'lib/hyperactive/hash.rb', line 38 def value @value end |