Class: SyntaxTree::StringContent

Inherits:
Node
  • Object
show all
Defined in:
lib/syntax_tree/node.rb

Overview

StringContent represents the contents of a string-like value.

"string"

Instance Attribute Summary collapse

Attributes inherited from Node

#location

Instance Method Summary collapse

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.



9182
9183
9184
9185
# File 'lib/syntax_tree/node.rb', line 9182

def initialize(parts:, location:)
  @parts = parts
  @location = location
end

Instance Attribute Details

#partsObject (readonly)

Array[ StringEmbExpr | StringDVar | TStringContent ]

the parts of the

string



9180
9181
9182
# File 'lib/syntax_tree/node.rb', line 9180

def parts
  @parts
end