Class: Hyperactive::Hash::Element

Inherits:
Record::Bass show all
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

Record::Bass::HOST

Instance Attribute Summary collapse

Attributes inherited from Record::Bass

#record_id

Attributes included from Transactions::Participant

#transaction

Instance Method Summary collapse

Methods inherited from Record::Bass

#<=>, #create, #destroy!, find, get_instance

Methods included from Hyperactive::Hooker::Pimp

append_features, #load_hook, #save_hook

Methods included from Transactions::Participant

append_features, #with_transaction

Methods included from Transactions::Accessors

append_features

Methods included from Index::Indexable

append_features

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

#keyObject

Returns the value of attribute key.



38
39
40
# File 'lib/hyperactive/hash.rb', line 38

def key
  @key
end

#list_elementObject

Returns the value of attribute list_element.



38
39
40
# File 'lib/hyperactive/hash.rb', line 38

def list_element
  @list_element
end

#valueObject

Returns the value of attribute value.



38
39
40
# File 'lib/hyperactive/hash.rb', line 38

def value
  @value
end