Method: RuboCop::Cop::Style::ModuleFunction#on_module
- Defined in:
- lib/rubocop/cop/style/module_function.rb
#on_module(node) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/rubocop/cop/style/module_function.rb', line 21 def on_module(node) _name, body = *node return unless body && body.type == :begin body.children.each do |body_node| add_offense(body_node, :expression) if body_node == TARGET_NODE end end |