Class: SyntaxTree::WordsBeg
- Inherits:
-
Object
- Object
- SyntaxTree::WordsBeg
- Defined in:
- lib/syntax_tree.rb
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
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- String
-
the start of the word literal array.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ WordsBeg
constructor
A new instance of WordsBeg.
Constructor Details
#initialize(value:, location:) ⇒ WordsBeg
Returns a new instance of WordsBeg.
13474 13475 13476 13477 |
# File 'lib/syntax_tree.rb', line 13474 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
13472 13473 13474 |
# File 'lib/syntax_tree.rb', line 13472 def location @location end |
#value ⇒ Object (readonly)
- String
-
the start of the word literal array
13469 13470 13471 |
# File 'lib/syntax_tree.rb', line 13469 def value @value end |