Class: ActiveRecord::MigrationProxy

Inherits:
Struct
  • Object
show all
Defined in:
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

Constructor Details

#initialize(name, version, filename) ⇒ MigrationProxy

Returns a new instance of MigrationProxy.



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

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

Instance Attribute Details

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



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

def filename
  @filename
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



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

def version
  @version
end

Instance Method Details

#basenameObject



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

def basename
  File.basename(filename)
end