Class: SyntaxTree::SymbolContent
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.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ SymbolContent
Returns a new instance of SymbolContent.
9938 9939 9940 9941 |
# File 'lib/syntax_tree/node.rb', line 9938 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
9936 9937 9938 |
# File 'lib/syntax_tree/node.rb', line 9936 def location @location end |
#value ⇒ Object (readonly)
- Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op
-
the value of the
symbol
9933 9934 9935 |
# File 'lib/syntax_tree/node.rb', line 9933 def value @value end |