Class: Backup::Database::Base
- Inherits:
-
Object
- Object
- Backup::Database::Base
- Includes:
- CLI::Helpers, Configuration::Helpers
- Defined in:
- lib/backup/database/base.rb
Direct Known Subclasses
MongoDB, MySQL, PostgreSQL, Redis, Riak
Constant Summary
Constants included from CLI::Helpers
Instance Attribute Summary collapse
-
#utility_path ⇒ Object
Allows the user to specify the path to a “dump” utility in case it cannot be auto-detected by Backup [DEPRECATED] - use each subclass’ <utility_name>_utility method.
Instance Method Summary collapse
-
#initialize(model) ⇒ Base
constructor
Creates a new instance of the MongoDB database object * Called using super(model) from subclasses *.
-
#perform! ⇒ Object
Super method for all child (database) objects.
Methods included from Configuration::Helpers
#clear_defaults!, #load_defaults!
Methods included from CLI::Helpers
#command_name, #raise_if_command_failed!, #run, #utility
Constructor Details
#initialize(model) ⇒ Base
Creates a new instance of the MongoDB database object
-
Called using super(model) from subclasses *
18 19 20 21 |
# File 'lib/backup/database/base.rb', line 18 def initialize(model) @model = model load_defaults! end |
Instance Attribute Details
#utility_path ⇒ Object
Allows the user to specify the path to a “dump” utility in case it cannot be auto-detected by Backup
- DEPRECATED
-
use each subclass’ <utility_name>_utility method
-
13 14 15 |
# File 'lib/backup/database/base.rb', line 13 def utility_path @utility_path end |
Instance Method Details
#perform! ⇒ Object
Super method for all child (database) objects. Every database object’s #perform! method should call #super before anything else to prepare
26 27 28 29 |
# File 'lib/backup/database/base.rb', line 26 def perform! prepare! log! end |