class Rubocop::Cop::Style::ModuleFunction
end
…
extend self
module Test
@example
This cops checks for use of ‘extend self` in a module.
def on_module(node)
def on_module(node) _name, body = *node if body && body.type == :begin body.children.each do |body_node| if body_node == TARGET_NODE add_offence(:convention, body_node.loc.expression, MSG) end end end end