Module: RuboCop::Cop::Sequel::Helpers::Migration
- Extended by:
- NodePattern::Macros
- Included in:
- ConcurrentIndex, IrreversibleMigration, JSONColumn, PartialConstraint
- Defined in:
- lib/rubocop/cop/sequel/helpers/migration.rb
Overview
Migration contains helper methods for detecting if a node is inside a ‘Sequel.migration` block
Instance Method Summary collapse
Instance Method Details
#within_sequel_migration?(node) ⇒ Boolean
18 19 20 |
# File 'lib/rubocop/cop/sequel/helpers/migration.rb', line 18 def within_sequel_migration?(node) node.each_ancestor(:block).any? { |ancestor| sequel_migration_block?(ancestor) } end |