Class: SyntaxTree::QWordsBeg
- Inherits:
-
Object
- Object
- SyntaxTree::QWordsBeg
- Defined in:
- lib/syntax_tree.rb
Overview
QWordsBeg represents the beginning of a string literal array.
%w[one two three]
In the snippet above, QWordsBeg represents the “%w[” token. 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 beginning of the array literal.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ QWordsBeg
constructor
A new instance of QWordsBeg.
Constructor Details
#initialize(value:, location:) ⇒ QWordsBeg
Returns a new instance of QWordsBeg.
9726 9727 9728 9729 |
# File 'lib/syntax_tree.rb', line 9726 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
9724 9725 9726 |
# File 'lib/syntax_tree.rb', line 9724 def location @location end |
#value ⇒ Object (readonly)
- String
-
the beginning of the array literal
9721 9722 9723 |
# File 'lib/syntax_tree.rb', line 9721 def value @value end |