class SyntaxTree::QWordsBeg
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<).
Attributes
value[R]
- String
-
the beginning of the array literal
Public Class Methods
new(value:, location:)
click to toggle source
# File lib/syntax_tree/node.rb, line 8862 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
===(other)
click to toggle source
# File lib/syntax_tree/node.rb, line 8888 def ===(other) other.is_a?(QWordsBeg) && value === other.value end
accept(visitor)
click to toggle source
# File lib/syntax_tree/node.rb, line 8867 def accept(visitor) visitor.visit_qwords_beg(self) end
child_nodes()
click to toggle source
# File lib/syntax_tree/node.rb, line 8871 def child_nodes [] end
Also aliased as: deconstruct
copy(value: nil, location: nil)
click to toggle source
# File lib/syntax_tree/node.rb, line 8875 def copy(value: nil, location: nil) QWordsBeg.new( value: value || self.value, location: location || self.location ) end
deconstruct_keys(_keys)
click to toggle source
# File lib/syntax_tree/node.rb, line 8884 def deconstruct_keys(_keys) { value: value, location: location } end