Class: Hyperactive::Hash::Element

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

Instance Method Summary collapse

Methods included from Cleaner::Accessors

append_features, #dirty?, #is_clean!, #is_dirty!

Methods included from Transactions::Accessors

append_features

Methods included from Index::Indexable

append_features

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

#keyObject

Returns the value of attribute key.



43
44
45
# File 'lib/hyperactive/hash.rb', line 43

def key
  @key
end

#list_elementObject

Returns the value of attribute list_element.



43
44
45
# File 'lib/hyperactive/hash.rb', line 43

def list_element
  @list_element
end

#valueObject

Returns the value of attribute value.



43
44
45
# File 'lib/hyperactive/hash.rb', line 43

def value
  @value
end