class SyntaxTree::Label

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

# sig/syntax_tree/node.rbs

class SyntaxTree::Label < SyntaxTree::Node
  def child_nodes: () -> untyped
end

In this case “key:” would be the body of the label.
end
in key:
case value
pattern matching, as in:
In this case “key:” would be the body of the label. You can also find it in
{ key: value }
can find it in a hash key, as in:
Label represents the use of an identifier to associate with an object. You

def ===(other)

def ===(other)
  other.is_a?(Label) && value === other.value
end

def accept(visitor)

def accept(visitor)
  visitor.visit_label(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 1 sample from 1 application.

def child_nodes
  []
end

def copy(value: nil, location: nil)

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

def deconstruct_keys(_keys)

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

def format(q)

def format(q)
  q.text(value)
end

def initialize(value:, location:)

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