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 544
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 554
def << *args
  self.yield(*args)
  self
end
            
yield(*args) click to toggle source
 
               # File mrbgems/mruby-enumerator/mrblib/enumerator.rb, line 550
def yield(*args)
  @proc.call(*args)
end