class RuboCop::AST::KeywordBeginNode

def rescue_node

Returns:
  • (Node, nil) - The `rescue` node within `kwbegin`.
def rescue_node
  return ensure_node&.rescue_node if ensure_node&.rescue_node
  node_parts[0] if node_parts[0]&.rescue_type?
end