Class: Iterator::Iteration
- Inherits:
-
Object
- Object
- Iterator::Iteration
- Defined in:
- lib/iterator.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(&block) ⇒ Iteration
constructor
A new instance of Iteration.
- #yield(*args) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Iteration
Returns a new instance of Iteration.
26 27 28 |
# File 'lib/iterator.rb', line 26 def initialize(&block) @block = block end |
Instance Method Details
#yield(*args) ⇒ Object
29 30 31 |
# File 'lib/iterator.rb', line 29 def yield(*args) @block.call(*args) end |