Class: SyntaxTree::WordsBeg
Overview
WordsBeg represents the beginning of a string literal array with interpolation.
%W[one two three]
In the snippet above, a WordsBeg would be created with the value of “%W[”. Note that these kinds of arrays can start with a lot of different delimiter types (e.g., %W| or %W<).
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- String
-
the start of the word literal array.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ WordsBeg
constructor
A new instance of WordsBeg.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ WordsBeg
Returns a new instance of WordsBeg.
11269 11270 11271 11272 |
# File 'lib/syntax_tree/node.rb', line 11269 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
- String
-
the start of the word literal array
11267 11268 11269 |
# File 'lib/syntax_tree/node.rb', line 11267 def value @value end |