Class: LazyEnumerator::Yielder

Inherits:
Object
  • Object
show all
Defined in:
lib/coroutines.rb

Instance Method Summary collapse

Constructor Details

#initialize(iter_block) ⇒ Yielder

Returns a new instance of Yielder.



237
238
239
# File 'lib/coroutines.rb', line 237

def initialize(iter_block)
	@iter_block = iter_block
end

Instance Method Details

#yield(*values) ⇒ Object Also known as: <<



240
241
242
# File 'lib/coroutines.rb', line 240

def yield(*values)
	@iter_block.call(*values)
end