Class: SyntaxTree::StringContent
- Inherits:
-
Object
- Object
- SyntaxTree::StringContent
- Defined in:
- lib/syntax_tree.rb
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.
Constructor Details
#initialize(parts:, location:) ⇒ StringContent
Returns a new instance of StringContent.
11030 11031 11032 11033 |
# File 'lib/syntax_tree.rb', line 11030 def initialize(parts:, location:) @parts = parts @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
11028 11029 11030 |
# File 'lib/syntax_tree.rb', line 11028 def location @location end |
#parts ⇒ Object (readonly)
- Array[ StringEmbExpr | StringDVar | TStringContent ]
-
the parts of the
string
11025 11026 11027 |
# File 'lib/syntax_tree.rb', line 11025 def parts @parts end |