Extended maintenance of Ruby versions 1.8.7 and 1.9.2 will end on July 31, 2014. Read more

In Files

  • syck/rubyext.c

Parent

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;
}
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus