lib/sp_store/merkle/hash_tree_helper.rb
def visit_path_to_root(node_id)
    while node_id > 0
      yield node_id
      node_id = parent node_id
    end
    self
  end
# Yields the IDs of the nodes on the path from a leaf to the root.
#
# Args:
#   leaf_id:: the leaf starting the path
#
# Returns self.
Yields the IDs of the nodes on the path from a leaf to the root.
Args:
leaf_id:: the leaf starting the path

Returns self.
Yields the IDs of the nodes on the path from a leaf to the root . Args : leaf_id :: the leaf starting the path Returns self .
def visit_path_to_root(node_id)
    while node_id > 0
      yield node_id
      node_id = parent node_id
    end
    self
  end
def visit_path_to_root ( node_id ) while node_id > 0 yield node_id node_id = parent node_id end self end
Yields the IDs of the nodes on the path from a leaf to the root.
Yields the IDs of the nodes on the path from a leaf to the root .
node_id