class SyntaxTree::SymbolsBeg

SymbolsBeg represents the start of a symbol array literal with interpolation.

%I[one two three]

In the snippet above, SymbolsBeg 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 symbol literal array

Public Class Methods

new(value:, location:) click to toggle source
# File lib/syntax_tree/node.rb, line 10705
def initialize(value:, location:)
  @value = value
  @location = location
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 10731
def ===(other)
  other.is_a?(SymbolsBeg) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 10710
def accept(visitor)
  visitor.visit_symbols_beg(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 10714
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 10718
def copy(value: nil, location: nil)
  SymbolsBeg.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 10727
def deconstruct_keys(_keys)
  { value: value, location: location }
end