Class: Ro::Script::Migrate
Instance Attribute Summary collapse
-
#script ⇒ Object
Returns the value of attribute script.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(script:) ⇒ Migrate
constructor
A new instance of Migrate.
- #run! ⇒ Object
Constructor Details
#initialize(script:) ⇒ Migrate
Returns a new instance of Migrate.
9 10 11 |
# File 'lib/ro/script/migrate.rb', line 9 def initialize(script:) @script = script end |
Instance Attribute Details
#script ⇒ Object
Returns the value of attribute script.
7 8 9 |
# File 'lib/ro/script/migrate.rb', line 7 def script @script end |
Class Method Details
.run!(script:) ⇒ Object
3 4 5 |
# File 'lib/ro/script/migrate.rb', line 3 def self.run!(script:) new(script: script).run! end |
Instance Method Details
#run! ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ro/script/migrate.rb', line 13 def run! root_path = get_root_path (root_path) migrator = Ro::Migrator.new(root_path, ) validate_and_report(migrator) return if [:dry_run] confirm_unless_forced! execute_migration(migrator) end |