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.



46
47
48
49
50
# File 'lib/hyperactive/hash.rb', line 46

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.



41
42
43
# File 'lib/hyperactive/hash.rb', line 41

def key
  @key
end

#list_elementObject

Returns the value of attribute list_element.



41
42
43
# File 'lib/hyperactive/hash.rb', line 41

def list_element
  @list_element
end

#valueObject

Returns the value of attribute value.



41
42
43
# File 'lib/hyperactive/hash.rb', line 41

def value
  @value
end