class SyntaxTree::QSymbolsBeg

QSymbolsBeg represents the beginning of a symbol literal array.

%i[one two three]

In the snippet above, QSymbolsBeg represents the “%i[” token. Note that these kinds of arrays can start with a lot of different delimiter types (e.g., %i| or %i<).

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 8744
def initialize(value:, location:)
  @value = value
  @location = location
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 8770
def ===(other)
  other.is_a?(QSymbolsBeg) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 8749
def accept(visitor)
  visitor.visit_qsymbols_beg(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 8753
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 8757
def copy(value: nil, location: nil)
  QSymbolsBeg.new(
    value: value || self.value,
    location: location || self.location
  )
end
deconstruct()
Alias for: child_nodes
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/node.rb, line 8766
def deconstruct_keys(_keys)
  { value: value, location: location }
end