Class: Lab42::Console::H
- Extended by:
- Tools::ForwardToNewInstance
- Defined in:
- lib/lab42/console/h.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
Methods included from Tools::ForwardToNewInstance
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
7 8 9 |
# File 'lib/lab42/console/h.rb', line 7 def hash @hash end |
Instance Method Details
#find(*keys) ⇒ Object
9 10 11 |
# File 'lib/lab42/console/h.rb', line 9 def find *keys prewalk hash end |
#pre_walk(nodes, condition, visitor, visited: Set.new) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lab42/console/h.rb', line 13 def pre_walk nodes, condition, visitor, visited: Set.new return if visisted.includes? nodes case nodes when Hash walk_hash_pairs nodes, condition, visitor, visited: visited when Enumerable nodes.each do |ele| pre_walk ele, condition, visitor, visited: visited.add(ele) end end end |