class SyntaxTree::EmbExprEnd

EmbExprEnd represents the ending 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 5083
def initialize(value:, location:)
  @value = value
  @location = location
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 5109
def ===(other)
  other.is_a?(EmbExprEnd) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 5088
def accept(visitor)
  visitor.visit_embexpr_end(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 5092
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 5096
def copy(value: nil, location: nil)
  EmbExprEnd.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 5105
def deconstruct_keys(_keys)
  { value: value, location: location }
end