Class: Enumerator::Yielder
Instance Method Summary collapse
-
#<< ⇒ Object
:nodoc:.
-
#initialize ⇒ Object
constructor
:nodoc:.
-
#yield ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ Object
:nodoc:
|
# File 'enumerator.c'
static VALUE
yielder_initialize(VALUE obj)
{
rb_need_block();
return yielder_init(obj, rb_block_proc());
}
|
Instance Method Details
#<< ⇒ Object
:nodoc:
|
# File 'enumerator.c'
static VALUE yielder_yield_push(VALUE obj, VALUE args)
{
yielder_yield(obj, args);
return obj;
}
|
#yield ⇒ Object
:nodoc:
|
# File 'enumerator.c'
static VALUE
yielder_yield(VALUE obj, VALUE args)
{
struct yielder *ptr = yielder_ptr(obj);
return rb_proc_call(ptr->proc, args);
}
|