Class: YAML::Syck::Out

Class | YAML::Syck::Out
In: | syck/rubyext.c
Parent: | Object

### Methods

map new scalar seq

### Public Class methods

new(p1)

YAML::Syck::Out::initialize

[Source]

    /*
     * YAML::Syck::Out::initialize
     */
    VALUE
    syck_out_initialize( self, emitter )
        VALUE self, emitter;
    {
        rb_ivar_set( self, s_emitter, emitter );
        return self;
    }

### Public Instance methods

map(...)

YAML::Syck::Out::map

[Source]

    /*
     * YAML::Syck::Out::map
     */
    VALUE
    syck_out_map( argc, argv, self )
        int argc;
        VALUE *argv;
        VALUE self;
    {
        VALUE type_id, style, map;
        if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
            style = Qnil;
        }
        map = rb_funcall( cMap, s_new, 3, type_id, rb_hash_new(), style );
        syck_out_mark( rb_ivar_get( self, s_emitter ), map );
        rb_yield( map );
        return map;
    }

scalar(...)

       YAML::Syck::Out::scalar

syck_out_scalar( self, type_id, str, style )

        VALUE self, type_id, str, style;

[Source]

    /*
     * YAML::Syck::Out::scalar
    syck_out_scalar( self, type_id, str, style )
        VALUE self, type_id, str, style;
     */
    VALUE
    syck_out_scalar( argc, argv, self )
        int argc;
        VALUE *argv;
        VALUE self;
    {
        VALUE type_id, str, style, scalar;
        if (rb_scan_args(argc, argv, "21", &type_id, &str, &style) == 2) {
            style = Qnil;
        }
        scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style );
        syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );
        return scalar;
    }

seq(...)

YAML::Syck::Out::seq

[Source]

    /*
     * YAML::Syck::Out::seq
     */
    VALUE
    syck_out_seq( argc, argv, self )
        int argc;
        VALUE *argv;
        VALUE self;
    {
        VALUE type_id, style, seq;
        if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
            style = Qnil;
        }
        seq = rb_funcall( cSeq, s_new, 3, type_id, rb_ary_new(), style );
        syck_out_mark( rb_ivar_get( self, s_emitter ), seq );
        rb_yield( seq );
        return seq;
    }

[Validate]