Class: YARP::IntegerNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::IntegerNode
- Defined in:
- lib/yarp/node.rb,
lib/yarp.rb,
ext/yarp/api_node.c
Overview
Represents an integer number literal.
1
^
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void.
-
#child_nodes ⇒ Object
(also: #deconstruct)
def child_nodes: () -> Array[nil | Node].
-
#copy(**params) ⇒ Object
def copy: (**params) -> IntegerNode.
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location) ⇒ IntegerNode
constructor
def initialize: (location: Location) -> void.
- #value ⇒ Object
Constructor Details
#initialize(location) ⇒ IntegerNode
def initialize: (location: Location) -> void
4222 4223 4224 |
# File 'lib/yarp/node.rb', line 4222 def initialize(location) @location = location end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
4227 4228 4229 |
# File 'lib/yarp/node.rb', line 4227 def accept(visitor) visitor.visit_integer_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
4232 4233 4234 |
# File 'lib/yarp/node.rb', line 4232 def child_nodes [] end |
#copy(**params) ⇒ Object
def copy: (**params) -> IntegerNode
4237 4238 4239 4240 4241 |
# File 'lib/yarp/node.rb', line 4237 def copy(**params) IntegerNode.new( params.fetch(:location) { location }, ) end |
#deconstruct_keys(keys) ⇒ Object
4247 4248 4249 |
# File 'lib/yarp/node.rb', line 4247 def deconstruct_keys(keys) { location: location } end |
#value ⇒ Object
349 350 351 |
# File 'lib/yarp.rb', line 349 def value Integer(slice) end |