Class: Enumerator::Yielder

Inherits:
Object show all
Defined in:
enumerator.c

Instance Method Summary collapse

Constructor Details

#initializeObject

:nodoc:


1057
1058
1059
1060
1061
1062
1063
# File 'enumerator.c', line 1057

static VALUE
yielder_initialize(VALUE obj)
{
    rb_need_block();

    return yielder_init(obj, rb_block_proc());
}

Instance Method Details

#<<Object

:nodoc:


1075
1076
1077
1078
1079
# File 'enumerator.c', line 1075

static VALUE yielder_yield_push(VALUE obj, VALUE args)
{
    yielder_yield(obj, args);
    return obj;
}

#yieldObject

:nodoc:


1066
1067
1068
1069
1070
1071
1072
# File 'enumerator.c', line 1066

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

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