Class: Yadriggy::Name
Overview
Abstract class.
Direct Known Subclasses
Const, GlobalVariable, IdentifierOrCall, InstanceVariable, Label, Reserved
Instance Attribute Summary collapse
-
#column ⇒ Integer
readonly
The column.
-
#line_no ⇒ Integer
readonly
The line number.
-
#name ⇒ String
readonly
The name.
Attributes inherited from ASTnode
Instance Method Summary collapse
-
#to_sym ⇒ Symbol
Converts the name to a symbol.
Methods inherited from ASTnode
#add_child, #add_children, #const_value, #const_value_in_class, #get_context_class, #get_receiver_object, #is_proc?, #pretty_print, #root, #source_location, #source_location_string, #value, #value_in_class
Instance Attribute Details
#column ⇒ Integer (readonly)
Returns the column.
83 84 85 |
# File 'lib/yadriggy/ast.rb', line 83 def column @column end |
#line_no ⇒ Integer (readonly)
Returns the line number.
80 81 82 |
# File 'lib/yadriggy/ast.rb', line 80 def line_no @line_no end |
#name ⇒ String (readonly)
Returns the name.
77 78 79 |
# File 'lib/yadriggy/ast.rb', line 77 def name @name end |
Instance Method Details
#to_sym ⇒ Symbol
Converts the name to a symbol
87 88 89 |
# File 'lib/yadriggy/ast.rb', line 87 def to_sym @name.to_sym end |