lib/jumoku/builders/extended.rb
# Removes all nodes mentionned in the specified Enumerable from the tree.
#
# The process relies on {RawTreeBuilder#remove_node! remove_node!}.
#
# @param [#each] *nodes an Enumerable nodes set; may contain Range
# @return [Tree] `self`
#
# @example
#
#   remove_nodes! 1, 3..5
#
Removes all nodes mentionned in the specified Enumerable from the tree.
Removes all nodes mentionned in the specified Enumerable from the tree .
def remove_nodes!(*nodes)
      nodes = nodes.to_a.map { |i| i.is_a?(Range) ? i.to_a : i }.flatten
      nodes.each { |v| remove_node! v }
      self
    end
def remove_nodes! ( * nodes ) nodes = nodes . to_a . map { | i | i . is_a? ( Range ) ? i . to_a : i } . flatten nodes . each { | v | remove_node! v } self end
Removes all nodes mentionned in the specified Enumerable from the tree.
Removes all nodes mentionned in the specified Enumerable from the tree .
None
Tree
nodes
<not_specific>
<not_specific>
nodes an Enumerable nodes set; may contain Range
nodes an Enumerable nodes set ; may contain Range
example
None