Sha256: 4ee6a43f7e18f3404264756dcfd7e3754b735fef530a72ad2a231a4e149527d2
Contents?: true
Size: 531 Bytes
Versions: 13
Compression:
Stored size: 531 Bytes
Contents
module Gitlab module Styles module Rubocop # Module containing helper methods for writing migration cops. module MigrationHelpers # Returns true if the given node originated from the db/migrate directory. def in_migration?(node) dirname = File.dirname(node.location.expression.source_buffer.name) dirname.end_with?( 'db/migrate', 'db/post_migrate', 'ee/db/migrate', 'ee/db/post_migrate') end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems