class Migrate::Migration
Attributes
name[R]
Public Class Methods
new(path)
click to toggle source
# File lib/migrate/migration.rb, line 23 def initialize(path) @path = path @name = path.relative_path end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/migrate/migration.rb, line 42 def <=> other @name <=> other.name end
call(controller)
click to toggle source
# File lib/migrate/migration.rb, line 30 def call(controller) self.instance_eval(::File.read(@path), @path) end
migrate(target, using:, &block)
click to toggle source
# File lib/migrate/migration.rb, line 34 def migrate(target, using:, &block) using.migrate(self.name, target, &block) end
to_s()
click to toggle source
# File lib/migrate/migration.rb, line 38 def to_s @name end