module NRSER::Ext::Tree
Instance methods that are refined in to the Ruby built-ins that we consider trees: {Array}, {Hash} and {OpenStruct}.
Public Instance Methods
each_branch(&block)
click to toggle source
Sends `self` and the optional `block` to {NRSER.each_branch}.
# File lib/nrser/ext/tree.rb, line 41 def each_branch &block NRSER.each_branch self, &block end
leaves()
click to toggle source
Sends `self` to {NRSER.leaves}.
# File lib/nrser/ext/tree.rb, line 27 def leaves NRSER.leaves self end
map_branches(&block)
click to toggle source
Calls {NRSER.map_branches} on `self` with `&block`.
# File lib/nrser/ext/tree.rb, line 48 def map_branches &block NRSER.map_branches self, &block end
map_leaves(&block)
click to toggle source
Calls {NRSER.map_leaves} on `self` with `&block`.
# File lib/nrser/ext/tree.rb, line 34 def map_leaves &block NRSER.map_leaves self, &block end
map_tree(**options, &block)
click to toggle source
Calls {NRSER.map_tree} on `self` with `&block`.
# File lib/nrser/ext/tree.rb, line 55 def map_tree **options, &block NRSER.map_tree self, **options, &block end