Class: YARP::TrueNode

Inherits:
YARPNode
  • Object
show all
Defined in:
lib/yarp/node.rb,
ext/yarp/api_node.c

Overview

Represents the use of the literal ‘true` keyword.

true
^^^^

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ TrueNode

def initialize: (location: Location) -> void



5942
5943
5944
# File 'lib/yarp/node.rb', line 5942

def initialize(location)
  @location = location
end

Instance Method Details

#accept(visitor) ⇒ Object

def accept: (visitor: Visitor) -> void



5947
5948
5949
# File 'lib/yarp/node.rb', line 5947

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

#child_nodesObject Also known as: deconstruct

def child_nodes: () -> Array[nil | Node]



5953
5954
5955
# File 'lib/yarp/node.rb', line 5953

def child_nodes
  []
end

#deconstruct_keys(keys) ⇒ Object

def deconstruct_keys: (keys: Array) -> Hash[Symbol, nil | Node | Array | String | Token | Array | Location]



5961
5962
5963
# File 'lib/yarp/node.rb', line 5961

def deconstruct_keys(keys)
  { location: location }
end