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.
9858 9859 9860 9861 |
# File 'lib/syntax_tree.rb', line 9858 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
[Location] the location of this node
9856 9857 9858 |
# File 'lib/syntax_tree.rb', line 9856 def location @location end |
#value ⇒ Object (readonly)
[String] the beginning of the array literal
9853 9854 9855 |
# File 'lib/syntax_tree.rb', line 9853 def value @value end |