class ActiveRecord::MigrationProxy

MigrationProxy is used to defer loading of the actual migration classes until they are needed

Public Class Methods

new(name, version, filename, scope) click to toggle source
Calls superclass method
# File lib/active_record/migration.rb, line 696
def initialize(name, version, filename, scope)
  super
  @migration = nil
end

Public Instance Methods

basename() click to toggle source
# File lib/active_record/migration.rb, line 701
def basename
  File.basename(filename)
end
mtime() click to toggle source
# File lib/active_record/migration.rb, line 705
def mtime
  File.mtime filename
end

Private Instance Methods

load_migration() click to toggle source
# File lib/active_record/migration.rb, line 717
def load_migration
  require(File.expand_path(filename))
  name.constantize.new
end
migration() click to toggle source
# File lib/active_record/migration.rb, line 713
def migration
  @migration ||= load_migration
end