class SyntaxTree::SymbolContent

SymbolContent represents symbol contents and is always the child of a SymbolLiteral node.

:symbol

Attributes

value[R]
Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op

the value of the

symbol

Public Class Methods

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

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 10557
def ===(other)
  other.is_a?(SymbolContent) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 10536
def accept(visitor)
  visitor.visit_symbol_content(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 10540
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 10544
def copy(value: nil, location: nil)
  SymbolContent.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 10553
def deconstruct_keys(_keys)
  { value: value, location: location }
end