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
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus