Method not available on this version
This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
type()
public
Returns the type of
this node as a symbol.
root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
root.type
call = root.children[2]
call.type
static VALUE
rb_ast_node_type(VALUE self)
{
struct ASTNodeData *data;
TypedData_Get_Struct(self, struct ASTNodeData, &rb_node_type, data);
return rb_sym_intern_ascii_cstr(node_type_to_str(data->node));
}