# class Object::Syck::Out

Define YAML::Syck::Out classes

### Attributes

emitter[RW]

### Public Class Methods

new(p1) click to toggle source

YAML::Syck::Out::initialize

    VALUE
    syck_out_initialize(VALUE self, VALUE emitter)
    {
        rb_ivar_set( self, s_emitter, emitter );
        return self;
    }

### Public Instance Methods

map(p1, p2 = v2) click to toggle source

YAML::Syck::Out::map

    VALUE
    syck_out_map(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(p1, p2, p3 = v3) click to toggle source

    YAML::Syck::Out::scalar

syck_out_scalar( self, type_id, str, style )

    VALUE self, type_id, str, style;

    VALUE
    syck_out_scalar(int argc, VALUE *argv, VALUE self)
    {
        VALUE type_id, str, style, scalar;
        rb_scan_args(argc, argv, "21", &type_id, &str, &style);
        scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style );
        syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );
        return scalar;
    }

seq(p1, p2 = v2) click to toggle source

YAML::Syck::Out::seq

    VALUE
    syck_out_seq(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;
    }