Class: CustomCops::MethodMissing
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- CustomCops::MethodMissing
- Defined in:
- lib/simplycop/custom_cops/method_missing.rb
Overview
This cop checks for the presence of ‘method_missing`
Constant Summary collapse
- MSG =
'Avoid method missing.'
Instance Method Summary collapse
- #on_def(node) ⇒ Object (also: #on_defs)
Instance Method Details
#on_def(node) ⇒ Object Also known as: on_defs
18 19 20 21 22 |
# File 'lib/simplycop/custom_cops/method_missing.rb', line 18 def on_def(node) return unless node.method?(:method_missing) add_offense(node) end |