In Files

  • mrbgems/mruby-enumerator/mrblib/enumerator.rb

Parent

Methods

Enumerator::Yielder

just for internal

Public Class Methods

new(&block) click to toggle source
 
               # File mrbgems/mruby-enumerator/mrblib/enumerator.rb, line 535
def initialize(&block)
  raise LocalJumpError, "no block given" unless block_given?

  @proc = block
end
            

Public Instance Methods

<<(*args) click to toggle source
 
               # File mrbgems/mruby-enumerator/mrblib/enumerator.rb, line 545
def << *args
  self.yield(*args)
  self
end
            
yield(*args) click to toggle source
 
               # File mrbgems/mruby-enumerator/mrblib/enumerator.rb, line 541
def yield(*args)
  @proc.call(*args)
end