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.
11534 11535 11536 11537 |
# File 'lib/syntax_tree.rb', line 11534 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
11532 11533 11534 |
# File 'lib/syntax_tree.rb', line 11532 def location @location end |
#value ⇒ Object (readonly)
- Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op
-
the value of the
symbol
11529 11530 11531 |
# File 'lib/syntax_tree.rb', line 11529 def value @value end |