Class: SyntaxTree::StringContent
Overview
StringContent represents the contents of a string-like value.
"string"
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#parts ⇒ Object
readonly
- Array[ StringEmbExpr | StringDVar | TStringContent ]
-
the parts of the string.
Instance Method Summary collapse
-
#initialize(parts:, location:) ⇒ StringContent
constructor
A new instance of StringContent.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(parts:, location:) ⇒ StringContent
Returns a new instance of StringContent.
9536 9537 9538 9539 |
# File 'lib/syntax_tree/node.rb', line 9536 def initialize(parts:, location:) @parts = parts @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
9534 9535 9536 |
# File 'lib/syntax_tree/node.rb', line 9534 def location @location end |
#parts ⇒ Object (readonly)
- Array[ StringEmbExpr | StringDVar | TStringContent ]
-
the parts of the
string
9531 9532 9533 |
# File 'lib/syntax_tree/node.rb', line 9531 def parts @parts end |