Class: Exodus::MigrationInfo
- Inherits:
-
Object
- Object
- Exodus::MigrationInfo
- Defined in:
- lib/exodus/config/migration_info.rb
Instance Attribute Summary collapse
-
#config_file ⇒ Object
Returns the value of attribute config_file.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#db ⇒ Object
Returns the value of attribute db.
-
#info ⇒ Object
Returns the value of attribute info.
-
#migrations_directory ⇒ Object
Returns the value of attribute migrations_directory.
-
#rake_namespace ⇒ Object
Returns the value of attribute rake_namespace.
Instance Method Summary collapse
-
#initialize(file = nil) ⇒ MigrationInfo
constructor
A new instance of MigrationInfo.
- #migrate ⇒ Object
- #migrate_custom ⇒ Object
- #rollback ⇒ Object
- #rollback_custom ⇒ Object
- #to_s ⇒ Object
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_file ⇒ Object
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 |
#connection ⇒ Object
Returns the value of attribute connection.
4 5 6 |
# File 'lib/exodus/config/migration_info.rb', line 4 def connection @connection end |
#db ⇒ Object
Returns the value of attribute db.
4 5 6 |
# File 'lib/exodus/config/migration_info.rb', line 4 def db @db end |
#info ⇒ Object
Returns the value of attribute info.
3 4 5 |
# File 'lib/exodus/config/migration_info.rb', line 3 def info @info end |
#migrations_directory ⇒ Object
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_namespace ⇒ Object
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
#migrate ⇒ Object
32 33 34 |
# File 'lib/exodus/config/migration_info.rb', line 32 def migrate verify_yml_syntax { @info['migration']['migrate'] } end |
#migrate_custom ⇒ Object
40 41 42 |
# File 'lib/exodus/config/migration_info.rb', line 40 def migrate_custom verify_yml_syntax { @info['migration']['custom']['migrate'] } end |
#rollback ⇒ Object
36 37 38 |
# File 'lib/exodus/config/migration_info.rb', line 36 def rollback verify_yml_syntax { @info['migration']['rollback'] } end |
#rollback_custom ⇒ Object
44 45 46 |
# File 'lib/exodus/config/migration_info.rb', line 44 def rollback_custom verify_yml_syntax { @info['migration']['custom']['rollback'] } end |
#to_s ⇒ Object
48 49 50 |
# File 'lib/exodus/config/migration_info.rb', line 48 def to_s @info end |