Class: RuboCop::Cop::G2::Migrations::Change

Inherits:
Cop
  • Object
show all
Includes:
MigrationsHelper
Defined in:
lib/rubocop/cop/g2/migrations/change.rb

Constant Summary collapse

MSG =
'Replace `change` with `up` and `down` migration methods when using schema methods that should check existence'.freeze

Instance Method Summary collapse

Instance Method Details

#on_def(node) ⇒ Object



13
14
15
16
17
# File 'lib/rubocop/cop/g2/migrations/change.rb', line 13

def on_def(node)
  return unless should_add_offense?(node)

  add_offense node
end