Represents a block’s parameters declaration.

-> (a, b = 1; local) { }
   ^^^^^^^^^^^^^^^^^

foo do |a, b = 1; local|
       ^^^^^^^^^^^^^^^^^
end
Attributes
Read

Represents the parameters of the block.

-> (a, b = 1; local) { }
    ^^^^^^^^

foo do |a, b = 1; local|
        ^^^^^^^^
end
Read

Represents the local variables of the block.

-> (a, b = 1; local) { }
              ^^^^^

foo do |a, b = 1; local|
                  ^^^^^
end
Class Methods

Initialize a new BlockParametersNode node.

Return a symbol representation of this node type. See ‘Node::type`.

Instance Methods

Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.

def accept: (Visitor visitor) -> void

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

def closing: () -> String?

Represents the closing location of the block parameters.

-> (a, b = 1; local) { }
                   ^

foo do |a, b = 1; local|
                       ^
end

def comment_targets: () -> Array[Node | Location]

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array, ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode

An alias for child_nodes

def deconstruct_keys: (Array keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array, opening_loc: Location?, closing_loc: Location? }

def inspect -> String

def opening: () -> String?

Represents the opening location of the block parameters.

-> (a, b = 1; local) { }
   ^

foo do |a, b = 1; local|
       ^
end

Save the closing_loc location using the given saved source so that it can be retrieved later.

Save the opening_loc location using the given saved source so that it can be retrieved later.

Return a symbol representation of this node type. See ‘Node#type`.