Module: NRSER::Refinements::Tree
- Defined in:
- lib/nrser/refinements/tree.rb
Overview
Instance methods that are refined in to the Ruby built-ins that we consider trees: Array, Hash and OpenStruct.
Instance Method Summary collapse
-
#each_branch(&block) ⇒ Object
Sends ‘self` and the optional `block` to NRSER.each_branch.
-
#leaves ⇒ Object
Sends ‘self` to NRSER.leaves.
Instance Method Details
#each_branch(&block) ⇒ Object
Sends ‘self` and the optional `block` to NRSER.each_branch.
36 37 38 |
# File 'lib/nrser/refinements/tree.rb', line 36 def each_branch &block NRSER.each_branch self, &block end |
#leaves ⇒ Object
Sends ‘self` to NRSER.leaves.
30 31 32 |
# File 'lib/nrser/refinements/tree.rb', line 30 def leaves NRSER.leaves self end |