class SyntaxTree::TopConstRef

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

# sig/syntax_tree/node.rbs

class SyntaxTree::TopConstRef < SyntaxTree::Node
  def accept: (Visitor visitor) -> untyped
end


::Constant
in an assignment.
TopConstRef is very similar to TopConstField except that it is not involved

def ===(other)

def ===(other)
  other.is_a?(TopConstRef) && 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 1 sample from 1 application.

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

def child_nodes

def child_nodes
  [constant]
end

def copy(constant: nil, location: nil)

def copy(constant: nil, location: nil)
  node =
    TopConstRef.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.text("::")
  q.format(constant)
end

def initialize(constant:, location:)

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