Class: Enumerator::Yielder

Inherits:
Object show all
Defined in:
enumerator.c

Instance Method Summary collapse

Constructor Details

#initializeObject

:nodoc:



# File 'enumerator.c'

/* :nodoc: */
static VALUE
yielder_initialize(VALUE obj)
{
    rb_need_block();

    return yielder_init(obj, rb_block_proc());
}

Instance Method Details

#<<Object

:nodoc:



# File 'enumerator.c'

/* :nodoc: */
static VALUE yielder_yield_push(VALUE obj, VALUE args)
{
    yielder_yield(obj, args);
    return obj;
}

#yieldObject

:nodoc:



# File 'enumerator.c'

/* :nodoc: */
static VALUE
yielder_yield(VALUE obj, VALUE args)
{
    struct yielder *ptr = yielder_ptr(obj);

    return rb_proc_call(ptr->proc, args);
}