1fe7501b49
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
10 lines
328 B
Ruby
10 lines
328 B
Ruby
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)
|
|
File.dirname(node.location.expression.source_buffer.name).
|
|
end_with?('db/migrate')
|
|
end
|
|
end
|
|
end
|