Class: Exodus::MigrationInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/exodus/config/migration_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file = nil) ⇒ MigrationInfo

Returns a new instance of MigrationInfo.



6
7
8
# File 'lib/exodus/config/migration_info.rb', line 6

def initialize(file = nil)
	config_file = file if file 
end

Instance Attribute Details

#config_fileObject

Returns the value of attribute config_file.



4
5
6
# File 'lib/exodus/config/migration_info.rb', line 4

def config_file
  @config_file
end

#connectionObject

Returns the value of attribute connection.



4
5
6
# File 'lib/exodus/config/migration_info.rb', line 4

def connection
  @connection
end

#dbObject

Returns the value of attribute db.



4
5
6
# File 'lib/exodus/config/migration_info.rb', line 4

def db
  @db
end

#infoObject

Returns the value of attribute info.



3
4
5
# File 'lib/exodus/config/migration_info.rb', line 3

def info
  @info
end

#migrations_directoryObject

Returns the value of attribute migrations_directory.



3
4
5
# File 'lib/exodus/config/migration_info.rb', line 3

def migrations_directory
  @migrations_directory
end

#rake_namespaceObject

Returns the value of attribute rake_namespace.



4
5
6
# File 'lib/exodus/config/migration_info.rb', line 4

def rake_namespace
  @rake_namespace
end

Instance Method Details

#migrateObject



32
33
34
# File 'lib/exodus/config/migration_info.rb', line 32

def migrate
	verify_yml_syntax { @info['migration']['migrate'] }
end

#migrate_customObject



40
41
42
# File 'lib/exodus/config/migration_info.rb', line 40

def migrate_custom
	verify_yml_syntax { @info['migration']['custom']['migrate'] }
end

#rollbackObject



36
37
38
# File 'lib/exodus/config/migration_info.rb', line 36

def rollback
	verify_yml_syntax { @info['migration']['rollback'] }
end

#rollback_customObject



44
45
46
# File 'lib/exodus/config/migration_info.rb', line 44

def rollback_custom
	verify_yml_syntax { @info['migration']['custom']['rollback'] }
end

#to_sObject



48
49
50
# File 'lib/exodus/config/migration_info.rb', line 48

def to_s
	@info
end