Class: Hyperactive::Tree::Root

Inherits:
Record::Bass show all
Includes:
Cleaner::Accessors
Defined in:
lib/hyperactive/tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Cleaner::Accessors

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

Methods included from Hyperactive::Transactions::Accessors

append_features

Methods included from Index::Indexable

append_features

Methods included from Record::Persistent

#<=>, append_features, #create, #destroy!, #with_transaction

Constructor Details

#initializeRoot

Returns a new instance of Root.



102
103
104
105
# File 'lib/hyperactive/tree.rb', line 102

def initialize
  super
  self.root = Node.nil_node
end

Instance Attribute Details

#rootObject

Returns the value of attribute root.



100
101
102
# File 'lib/hyperactive/tree.rb', line 100

def root
  @root
end

Instance Method Details

#[]=(key, value) ⇒ Object



107
108
109
# File 'lib/hyperactive/tree.rb', line 107

def []=(key, value)
  self.root = root.insert(key, value)
end