Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# ext/psych/yaml_tree.c

Go to the documentation of this file.

    00001 #include <psych.h>
    00002
    00003 VALUE cPsychVisitorsYamlTree;
    00004
    00005 /*
    00006  * call-seq: private_iv_get(target, prop)
    00007  *
    00008  * Get the private instance variable +prop+ from +target+
    00009  */
    00010 static VALUE private_iv_get(VALUE self, VALUE target, VALUE prop)
    00011 {
    00012     return rb_attr_get(target, rb_intern(StringValuePtr(prop)));
    00013 }
    00014
    00015 void Init_psych_yaml_tree(void)
    00016 {
    00017     VALUE psych     = rb_define_module("Psych");
    00018     VALUE visitors  = rb_define_module_under(psych, "Visitors");
    00019     VALUE visitor   = rb_define_class_under(visitors, "Visitor", rb_cObject);
    00020     cPsychVisitorsYamlTree = rb_define_class_under(visitors, "YAMLTree", visitor);
    00021
    00022     rb_define_private_method(cPsychVisitorsYamlTree, "private_iv_get", private_iv_get, 2);
    00023 }
    00024 /* vim: set noet sws=4 sw=4: */
    00025