Class: Backports::Yielder
Overview
A simple class which allows the construction of Enumerator from a block
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(&block) ⇒ Yielder
constructor
A new instance of Yielder.
- #yield(*arg) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Yielder
Returns a new instance of Yielder.
153 154 155 |
# File 'lib/backports/tools.rb', line 153 def initialize(&block) @main_block = block end |