class SyntaxTree::ConstRef

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/syntax_tree/node.rbs

class SyntaxTree::ConstRef < SyntaxTree::Node
  def accept: (Visitor visitor) -> untyped
  def child_nodes: () -> untyped
  def initialize: (constant: SyntaxTree::Const, location: SyntaxTree::Location) -> void
end


end
class Container
declaration.
ConstRef represents the name of the constant being used in a class or module

def ===(other)

def ===(other)
  other.is_a?(ConstRef) && constant === other.constant
end

def accept(visitor)

Experimental RBS support (using type sampling data from the type_fusion project).

def accept: (Visitor visitor) -> untyped

This signature was generated using 4 samples from 1 application.

def accept(visitor)
  visitor.visit_const_ref(self)
end

def child_nodes

Experimental RBS support (using type sampling data from the type_fusion project).

def child_nodes: () -> untyped

This signature was generated using 2 samples from 1 application.

def child_nodes
  [constant]
end

def copy(constant: nil, location: nil)

def copy(constant: nil, location: nil)
  node =
    ConstRef.new(
      constant: constant || self.constant,
      location: location || self.location
    )
  node.comments.concat(comments.map(&:copy))
  node
end

def deconstruct_keys(_keys)

def deconstruct_keys(_keys)
  { constant: constant, location: location, comments: comments }
end

def format(q)

def format(q)
  q.format(constant)
end

def initialize(constant:, location:)

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize: (constant: SyntaxTree::Const, location: SyntaxTree::Location) -> void

This signature was generated using 3 samples from 1 application.

def initialize(constant:, location:)
  @constant = constant
  @location = location
  @comments = []
end