Class: CustomCops::InstanceEval
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- CustomCops::InstanceEval
- Defined in:
- lib/simplycop/custom_cops/instance_eval.rb
Overview
This cop checks for usages of ‘instance_eval`
Constant Summary collapse
- MSG =
'Avoid instance_eval.'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
29 30 31 32 33 |
# File 'lib/simplycop/custom_cops/instance_eval.rb', line 29 def on_send(node) return unless instance_evaling?(node) add_offense(node.loc.selector) end |