class RuboCop::Cop::Style::ModuleFunction

def each_wrong_style(nodes)

def each_wrong_style(nodes)
  case style
  when :module_function
    private_directive = nodes.any? { |node| private_directive?(node) }
    nodes.each do |node|
      yield node if extend_self_node?(node) && !private_directive
    end
  when :extend_self
    nodes.each do |node|
      yield node if module_function_node?(node)
    end
  end
end