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 543
def initialize(&block)
  raise LocalJumpError, "no block given" unless block

  @proc = block
end
            

Public Instance Methods

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