Class: XRBP::SHAMap::TreeNode

Inherits:
Node
  • Object
show all
Defined in:
lib/xrbp/nodestore/shamap/tree_node.rb

Overview

Terminating tree node referencing concrete data

Constant Summary

Constants inherited from Node

Node::LEAF_TYPES, Node::TYPES

Instance Attribute Summary collapse

Attributes inherited from Node

#hash

Instance Method Summary collapse

Methods inherited from Node

#inner?, #leaf?, #update_hash

Methods included from NodeFactory

#make

Constructor Details

#initialize(args = {}) ⇒ TreeNode

Returns a new instance of TreeNode.



7
8
9
10
# File 'lib/xrbp/nodestore/shamap/tree_node.rb', line 7

def initialize(args={})
  super
  @item = args[:item]
end

Instance Attribute Details

#itemObject (readonly)

Returns the value of attribute item.



5
6
7
# File 'lib/xrbp/nodestore/shamap/tree_node.rb', line 5

def item
  @item
end

Instance Method Details

#peek_itemObject



16
17
18
# File 'lib/xrbp/nodestore/shamap/tree_node.rb', line 16

def peek_item
  item
end

#tree_node?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/xrbp/nodestore/shamap/tree_node.rb', line 12

def tree_node?
  true
end