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.



8
9
10
# File 'lib/exodus/config/migration_info.rb', line 8

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

Instance Attribute Details

#config_fileObject

Returns the value of attribute config_file.



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

def config_file
  @config_file
end

#connectionObject

Returns the value of attribute connection.



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

def connection
  @connection
end

#dbObject

Returns the value of attribute db.



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

def db
  @db
end

#infoObject

Returns the value of attribute info.



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

def info
  @info
end

#migrations_directoryObject

Returns the value of attribute migrations_directory.



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

def migrations_directory
  @migrations_directory
end

#rake_namespaceObject

Returns the value of attribute rake_namespace.



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

def rake_namespace
  @rake_namespace
end

Instance Method Details

#migrateObject



34
35
36
# File 'lib/exodus/config/migration_info.rb', line 34

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

#migrate_customObject



42
43
44
# File 'lib/exodus/config/migration_info.rb', line 42

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

#rollbackObject



38
39
40
# File 'lib/exodus/config/migration_info.rb', line 38

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

#rollback_customObject



46
47
48
# File 'lib/exodus/config/migration_info.rb', line 46

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

#to_sObject



50
51
52
# File 'lib/exodus/config/migration_info.rb', line 50

def to_s
	@info
end