Represents the use of the ‘in` keyword in a case statement.

case a; in b then c end
        ^^^^^^^^^^^
Attributes
Read

attr_reader pattern: Prism::node

Read

attr_reader statements: StatementsNode?

Class Methods

Initialize a new InNode 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 comment_targets: () -> Array[Node | Location]

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode

An alias for child_nodes

def deconstruct_keys: (Array keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? }

def in: () -> String

attr_reader in_loc: Location

def inspect -> String

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

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

def then: () -> String?

attr_reader then_loc: Location?

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