Class: RuboCop::Cop::Obsession::Rails::ShortValidate
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Obsession::Rails::ShortValidate
- Defined in:
- lib/rubocop/cop/obsession/rails/short_validate.rb
Overview
This cop checks for ‘validate` declarations that could be shorter.
Constant Summary collapse
- MSG =
'The `on:` argument is not needed in this validate.'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
29 30 31 |
# File 'lib/rubocop/cop/obsession/rails/short_validate.rb', line 29 def on_send(node) add_offense(node) if validate_with_unneeded_on?(node) end |