Class: Rubasteme::AST::Node
- Inherits:
-
Object
- Object
- Rubasteme::AST::Node
show all
- Defined in:
- lib/rubasteme/ast.rb
Instance Method Summary
collapse
Constructor Details
#initialize(_literal = nil) ⇒ Node
Returns a new instance of Node.
74
75
|
# File 'lib/rubasteme/ast.rb', line 74
def initialize(_literal = nil)
end
|
Instance Method Details
#to_a ⇒ Object
83
|
# File 'lib/rubasteme/ast.rb', line 83
def to_a; []; end
|
#to_s ⇒ Object
84
|
# File 'lib/rubasteme/ast.rb', line 84
def to_s; to_a.to_s; end
|
#type ⇒ Object
77
78
79
80
81
|
# File 'lib/rubasteme/ast.rb', line 77
def type
klass_name = self.class.name.split("::")[-1]
type_name = Utils.snake_case(klass_name.delete_suffix("Node"))
"ast_#{type_name}".intern
end
|