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.
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_file ⇒ Object
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 |
#connection ⇒ Object
Returns the value of attribute connection.
6 7 8 |
# File 'lib/exodus/config/migration_info.rb', line 6 def connection @connection end |
#db ⇒ Object
Returns the value of attribute db.
6 7 8 |
# File 'lib/exodus/config/migration_info.rb', line 6 def db @db end |
#info ⇒ Object
Returns the value of attribute info.
5 6 7 |
# File 'lib/exodus/config/migration_info.rb', line 5 def info @info end |
#migrations_directory ⇒ Object
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_namespace ⇒ Object
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
#migrate ⇒ Object
34 35 36 |
# File 'lib/exodus/config/migration_info.rb', line 34 def migrate verify_yml_syntax { @info['migration']['migrate'] } end |
#migrate_custom ⇒ Object
42 43 44 |
# File 'lib/exodus/config/migration_info.rb', line 42 def migrate_custom verify_yml_syntax { @info['migration']['custom']['migrate'] } end |
#rollback ⇒ Object
38 39 40 |
# File 'lib/exodus/config/migration_info.rb', line 38 def rollback verify_yml_syntax { @info['migration']['rollback'] } end |
#rollback_custom ⇒ Object
46 47 48 |
# File 'lib/exodus/config/migration_info.rb', line 46 def rollback_custom verify_yml_syntax { @info['migration']['custom']['rollback'] } end |
#to_s ⇒ Object
50 51 52 |
# File 'lib/exodus/config/migration_info.rb', line 50 def to_s @info end |