Class: SyntaxTree::SymbolContent
- Inherits:
-
Object
- Object
- SyntaxTree::SymbolContent
- Defined in:
- lib/syntax_tree.rb
Overview
SymbolContent represents symbol contents and is always the child of a SymbolLiteral node.
:symbol
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op
-
the value of the symbol.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ SymbolContent
constructor
A new instance of SymbolContent.
Constructor Details
#initialize(value:, location:) ⇒ SymbolContent
Returns a new instance of SymbolContent.
10975 10976 10977 10978 |
# File 'lib/syntax_tree.rb', line 10975 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
10973 10974 10975 |
# File 'lib/syntax_tree.rb', line 10973 def location @location end |
#value ⇒ Object (readonly)
- Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op
-
the value of the
symbol
10970 10971 10972 |
# File 'lib/syntax_tree.rb', line 10970 def value @value end |