Class: ActiveRecord::MigrationProxy

Inherits:
Struct show all
Defined in:
activerecord/lib/active_record/migration.rb

Overview

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Struct

#as_json

Constructor Details

- (MigrationProxy) initialize(name, version, filename)

Returns a new instance of MigrationProxy



498
499
500
501
# File 'activerecord/lib/active_record/migration.rb', line 498

def initialize(name, version, filename)
  super
  @migration = nil
end

Instance Attribute Details

- (Object) filename

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



496
497
498
# File 'activerecord/lib/active_record/migration.rb', line 496

def filename
  @filename
end

- (Object) name

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



496
497
498
# File 'activerecord/lib/active_record/migration.rb', line 496

def name
  @name
end

- (Object) version

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



496
497
498
# File 'activerecord/lib/active_record/migration.rb', line 496

def version
  @version
end

Instance Method Details

- (Object) basename



503
504
505
# File 'activerecord/lib/active_record/migration.rb', line 503

def basename
  File.basename(filename)
end