class ActiveRecord::MigrationProxy - activerecord-4.2.4 Documentation

# 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 752
    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 757
    def basename
      File.basename(filename)
    end

mtime() click to toggle source

    # File lib/active_record/migration.rb, line 761
    def mtime
      File.mtime filename
    end

### Private Instance Methods

load_migration() click to toggle source

    # File lib/active_record/migration.rb, line 773
    def load_migration
      require(File.expand_path(filename))
      name.constantize.new(name, version)
    end

migration() click to toggle source

    # File lib/active_record/migration.rb, line 769
    def migration
      @migration ||= load_migration
    end