Class: Node

Inherits:
Object show all
Defined in:
ext/getsource_base/getsource_base.c

Instance Method Summary collapse

Instance Method Details

#fileObject

The name of the ruby source file where the code associated with the node are defined



87
88
89
90
91
92
93
94
95
# File 'ext/getsource_base/getsource_base.c', line 87

VALUE rb_node_file(VALUE self) {
    NODE* _node;
    Data_Get_Struct(self,NODE,_node);

    if (nd_file(_node)  == NULL ) {
	    return rb_str_new2("");
    }
    return rb_str_new2(nd_file(_node) );
}

#lineObject

The number of the line where the code associated with note are defined in the ruby source file



75
76
77
78
79
80
81
# File 'ext/getsource_base/getsource_base.c', line 75

VALUE rb_node_line(VALUE self) {
    NODE* _node;
    Data_Get_Struct(self,NODE,_node);

    return INT2FIX(nd_line(_node));

}