Method: Agoo::ErrorStream#write

Defined in:
ext/agoo/error_stream.c

#write(str) ⇒ Object

call-seq: write(str)

Write the str to the stream, accumulating it until flush is called.



58
59
60
61
62
63
64
65
66
# File 'ext/agoo/error_stream.c', line 58

static VALUE
es_write(VALUE self, VALUE str) {
    ErrorStream es = (ErrorStream)DATA_PTR(self);
    int   cnt = (int)RSTRING_LEN(str);
    
    es->text = text_append(es->text, StringValuePtr(str), cnt);

    return INT2NUM(cnt);
}