Class: RuboCop::Cop::Mable::NoSafetyAssured
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Mable::NoSafetyAssured
- Defined in:
- lib/rubocop/cop/mable/no_safety_assured.rb
Overview
# good
remove_column :model_name....
Constant Summary collapse
- MSG =
'Are you sure safety_assured is required, is there a better way? https://github.com/ankane/strong_migrations'- RESTRICT_ON_SEND =
i[safety_assured].freeze
Instance Method Summary collapse
Instance Method Details
#bad_method?(node) ⇒ Object
25 26 27 |
# File 'lib/rubocop/cop/mable/no_safety_assured.rb', line 25 def_node_matcher :safety_assured?, "(send nil? :safety_assured ...)\n" |
#on_send(node) ⇒ Object
29 30 31 32 33 |
# File 'lib/rubocop/cop/mable/no_safety_assured.rb', line 29 def on_send(node) return unless safety_assured?(node) add_offense(node) end |