class RuboCop::AST::Node

def right_sibling

Returns:
  • (Node, nil) - the right (aka next) sibling
def right_sibling
  return unless parent
  parent.children[sibling_index + 1].freeze
end