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.
11454 11455 11456 11457 |
# File 'lib/syntax_tree.rb', line 11454 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
11452 11453 11454 |
# File 'lib/syntax_tree.rb', line 11452 def location @location end |
#value ⇒ Object (readonly)
- Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op
-
the value of the
symbol
11449 11450 11451 |
# File 'lib/syntax_tree.rb', line 11449 def value @value end |