lib/perobs/BTreeNodeLink.rb in perobs-4.1.0 vs lib/perobs/BTreeNodeLink.rb in perobs-4.2.0
- old
+ new
@@ -65,10 +65,12 @@
# Make it properly introspectable.
def respond_to?(method, include_private = false)
get_node.respond_to?(method)
end
+ # Directly define some commonly used methods to avoid the method_missing
+ # overhead.
def is_leaf
get_node.is_leaf
end
def keys
@@ -89,11 +91,19 @@
def search_key_index(key)
get_node.search_key_index(key)
end
+ def insert(key, value)
+ get_node.insert(key, value)
+ end
+
def insert_element(key, voc)
get_node.insert_element(key, voc)
+ end
+
+ def split_node
+ get_node.split_node
end
# Compare this node to another node.
# @return [Boolean] true if node address is identical, false otherwise
def ==(node)