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, #transaction

Instance Method Summary collapse

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

#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