Class: Stepper::Base
- Inherits:
-
Object
- Object
- Stepper::Base
- Defined in:
- lib/hash_walker/stepper_base.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#hash_fragment ⇒ Object
Returns the value of attribute hash_fragment.
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
3 4 5 |
# File 'lib/hash_walker/stepper_base.rb', line 3 def block @block end |
#hash_fragment ⇒ Object
Returns the value of attribute hash_fragment.
3 4 5 |
# File 'lib/hash_walker/stepper_base.rb', line 3 def hash_fragment @hash_fragment end |
Instance Method Details
#step! ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/hash_walker/stepper_base.rb', line 5 def step! if @block walker = HashWalker::Walker.new(:hash => @hash_fragment, :block => @block) walker.walk! else @hash_fragment end end |