class YARP::AssocNode

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

# sig/yarp/node.rbs

class YARP::AssocNode < YARP::Node
  def accept: (Analyzer::Visitor visitor) -> Array[Array, ]
  def child_nodes: () -> (Array[YARP::SymbolNode] | Array[YARP::StringNode] | Array[YARP::CallNode])
  
  type YARP__AssocNode_initialize_key = YARP::SymbolNode | YARP::StringNode | YARP::ConstantReadNode | YARP::IntegerNode | YARP::FalseNode
  type YARP__AssocNode_initialize_value = YARP::SymbolNode | YARP::CallNode | YARP::TrueNode | YARP::HashNode | YARP::LocalVariableReadNode | YARP::IntegerNode | YARP::RangeNode | YARP::StringNode | YARP::LambdaNode | YARP::FalseNode | YARP::InstanceVariableReadNode | YARP::NilNode | YARP::OrNode | YARP::ArrayNode
  
  def initialize: (YARP__AssocNode_initialize_key key, YARP__AssocNode_initialize_value value, YARP::Location? operator_loc, YARP::Location location) -> void
end

^^^^^^
{ a => b }
Represents a hash key/value pair.

def accept(visitor)

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

type YARP__AssocNode_accept_return_value = Array |  | Array | NilClass | NilClass | NilClass | Array | Array | NilClass | NilClass | NilClass | NilClass | NilClass | Array | Array | Array | Array |  | Array |  | Array | Array | Array |  | Array | Array | Array | Array |  | NilClass | NilClass | NilClass | NilClass | Array | Array |  | NilClass | Array | Array |  | Array |  | Array | NilClass | Array | Array | Array |  | NilClass | NilClass | NilClass | Array | NilClass | Array | Array | Array | Array |  | Array |  | Array | Array |  | Array |  | NilClass | Array | NilClass | Array | Array |  | Array |  | NilClass | Array | Array | Array | Array |  | Array |  | Array |  | Array |  | NilClass | NilClass | NilClass | Array | Array | Array |  | Array | Array |  | NilClass | Array | Array | NilClass | NilClass | NilClass | Array | Array | Array |  | Array | Array | Array |  | Array | Array |  | NilClass | NilClass | NilClass | Array | Array |  | NilClass | NilClass

def accept: (Analyzer::Visitor visitor) -> YARP__AssocNode_accept_return_value

This signature was generated using 139 samples from 1 application.

def accept: (visitor: Visitor) -> void
def accept(visitor)
  visitor.visit_assoc_node(self)
end

def child_nodes

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

type YARP__AssocNode_child_nodes_return_value = YARP::SymbolNode | YARP::ConstantReadNode | YARP::CallNode | YARP::StringNode | YARP::RangeNode | YARP::IntegerNode | YARP::LocalVariableReadNode | YARP::FalseNode | YARP::ArrayNode | YARP::HashNode | YARP::NilNode

def child_nodes: () -> YARP__AssocNode_child_nodes_return_value

This signature was generated using 157 samples from 1 application.

def child_nodes: () -> Array[nil | Node]
def child_nodes
  [key, value]
end

def deconstruct_keys(keys)

def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
def deconstruct_keys(keys)
  { key: key, value: value, operator_loc: operator_loc, location: location }
end

def initialize(key, value, operator_loc, location)

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

type YARP__AssocNode_initialize_key = YARP::SymbolNode | YARP::StringNode | YARP::ConstantReadNode | YARP::IntegerNode | YARP::FalseNode
type YARP__AssocNode_initialize_value = YARP::SymbolNode | YARP::CallNode | YARP::TrueNode | YARP::HashNode | YARP::LocalVariableReadNode | YARP::IntegerNode | YARP::RangeNode | YARP::StringNode | YARP::LambdaNode | YARP::FalseNode | YARP::InstanceVariableReadNode | YARP::NilNode | YARP::OrNode | YARP::ArrayNode

def initialize: (YARP__AssocNode_initialize_key key, YARP__AssocNode_initialize_value value, YARP::Location? operator_loc, YARP::Location location) -> void

This signature was generated using 143 samples from 1 application.

def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void
def initialize(key, value, operator_loc, location)
  @key = key
  @value = value
  @operator_loc = operator_loc
  @location = location
end

def operator

def operator: () -> String?
def operator
  operator_loc&.slice
end