Class: Parity::Backup
- Inherits:
-
Object
- Object
- Parity::Backup
- Defined in:
- lib/parity/backup.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Backup
constructor
A new instance of Backup.
- #restore ⇒ Object
Constructor Details
#initialize(args) ⇒ Backup
Returns a new instance of Backup.
5 6 7 8 |
# File 'lib/parity/backup.rb', line 5 def initialize(args) @from, @to = args.values_at(:from, :to) @additional_args = args[:additional_args] || "" end |
Instance Method Details
#restore ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/parity/backup.rb', line 10 def restore if to == "development" restore_to_development elsif from == "development" restore_from_development else restore_to_remote_environment end end |