Ruby
1.9.3p551(2014-11-13revision48407)
Main Page
Modules
Data Structures
Files
File List
Globals
ext
psych
yaml_tree.c
Go to the documentation of this file.
1
#include <
psych.h
>
2
3
VALUE
cPsychVisitorsYamlTree
;
4
5
/*
6
* call-seq: private_iv_get(target, prop)
7
*
8
* Get the private instance variable +prop+ from +target+
9
*/
10
static
VALUE
private_iv_get
(
VALUE
self
,
VALUE
target,
VALUE
prop)
11
{
12
return
rb_attr_get
(target,
rb_intern
(
StringValuePtr
(prop)));
13
}
14
15
void
Init_psych_yaml_tree
(
void
)
16
{
17
VALUE
psych =
rb_define_module
(
"Psych"
);
18
VALUE
visitors =
rb_define_module_under
(psych,
"Visitors"
);
19
VALUE
visitor =
rb_define_class_under
(visitors,
"Visitor"
,
rb_cObject
);
20
cPsychVisitorsYamlTree
=
rb_define_class_under
(visitors,
"YAMLTree"
, visitor);
21
22
rb_define_private_method
(
cPsychVisitorsYamlTree
,
"private_iv_get"
,
private_iv_get
, 2);
23
}
24
/* vim: set noet sws=4 sw=4: */
25
Generated on Fri Nov 14 2014 16:04:01 for Ruby by
1.8.3