class SyntaxTree::EmbExprBeg

EmbExprBeg represents the beginning token for using interpolation inside of a parent node that accepts string content (like a string or regular expression).

"Hello, #{person}!"

Attributes

value[R]
String

the #{ used in the string

Public Class Methods

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

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 5068
def ===(other)
  other.is_a?(EmbExprBeg) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 5047
def accept(visitor)
  visitor.visit_embexpr_beg(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 5051
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 5055
def copy(value: nil, location: nil)
  EmbExprBeg.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 5064
def deconstruct_keys(_keys)
  { value: value, location: location }
end