method

type

ruby latest stable - Class: RubyVM::AbstractSyntaxTree::Node

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 # => :SCOPE
call = root.children[2]
call.type # => :OPCALL