module RuboCop::Cop::OnMethodDef

def method_def_node_parts(node)

the scope to the end where it can easily be ignored.
This method provides scope agnostic method node destructuring by moving
def method_def_node_parts(node)
  if node.def_type?
    method_name, args, body = *node
  elsif node.defs_type?
    scope, method_name, args, body = *node
  else
    return []
  end
  [method_name, args, body, scope]
end

def modifier_and_def_on_same_line?(send_node)

which are allowed in Ruby 2.1 and later.
private def my_method
Returns true for constructs such as
def modifier_and_def_on_same_line?(send_node)
  send_node.receiver.nil? &&
    send_node.method_name != :def &&
    send_node.method_args.size == 1 &&
    [:def, :defs].include?(send_node.method_args.first.type)
end

def on_def(node)

def on_def(node)
  method_name, args, body = *node
  on_method_def(node, method_name, args, body)
end

def on_defs(node)

def on_defs(node)
  _scope, method_name, args, body = *node
  on_method_def(node, method_name, args, body)
end