Class: CustomCops::DefineMethod
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- CustomCops::DefineMethod
- Defined in:
- lib/simplycop/custom_cops/define_method.rb
Overview
This cop checks for dynamically defining methods
Constant Summary collapse
- MSG =
'Avoid define_method.'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
23 24 25 26 27 |
# File 'lib/simplycop/custom_cops/define_method.rb', line 23 def on_send(node) return unless defining_method?(node) add_offense(node.loc.selector) end |