Class: ServerBackups::RestoreBase
- Inherits:
-
Object
- Object
- ServerBackups::RestoreBase
- Defined in:
- lib/server_backups/restore_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#restore_point ⇒ Object
readonly
Returns the value of attribute restore_point.
-
#s3 ⇒ Object
readonly
Returns the value of attribute s3.
-
#working_dir ⇒ Object
readonly
Returns the value of attribute working_dir.
Instance Method Summary collapse
-
#initialize(config_file, working_dir, restore_point) ⇒ RestoreBase
constructor
A new instance of RestoreBase.
Constructor Details
#initialize(config_file, working_dir, restore_point) ⇒ RestoreBase
Returns a new instance of RestoreBase.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/server_backups/restore_base.rb', line 7 def initialize(config_file, working_dir, restore_point) @working_dir = working_dir @config = Config.new(config_file) Time.zone = config.time_zone @restore_point = if restore_point.present? restore_point else Time.zone.now end @s3 = S3.new(config) logger.debug "Initialized #{title}." end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/server_backups/restore_base.rb', line 5 def config @config end |
#database ⇒ Object (readonly)
Returns the value of attribute database.
5 6 7 |
# File 'lib/server_backups/restore_base.rb', line 5 def database @database end |
#restore_point ⇒ Object (readonly)
Returns the value of attribute restore_point.
5 6 7 |
# File 'lib/server_backups/restore_base.rb', line 5 def restore_point @restore_point end |
#s3 ⇒ Object (readonly)
Returns the value of attribute s3.
5 6 7 |
# File 'lib/server_backups/restore_base.rb', line 5 def s3 @s3 end |
#working_dir ⇒ Object (readonly)
Returns the value of attribute working_dir.
5 6 7 |
# File 'lib/server_backups/restore_base.rb', line 5 def working_dir @working_dir end |