Class: Ariranha::Drivers::BaseDriver
- Inherits:
-
Object
- Object
- Ariranha::Drivers::BaseDriver
- Defined in:
- lib/ariranha/drivers/base_driver.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Returns the value of attribute database.
Instance Method Summary collapse
- #backup ⇒ Object
-
#initialize(config) ⇒ BaseDriver
constructor
A new instance of BaseDriver.
Constructor Details
#initialize(config) ⇒ BaseDriver
Returns a new instance of BaseDriver.
6 7 8 9 10 |
# File 'lib/ariranha/drivers/base_driver.rb', line 6 def initialize(config) @config = config config_driver @timestamp = Time.now.getutc.strftime('%Y%m%d%H%M%S') end |
Instance Attribute Details
#database ⇒ Object (readonly)
Returns the value of attribute database.
12 13 14 |
# File 'lib/ariranha/drivers/base_driver.rb', line 12 def database @database end |
Instance Method Details
#backup ⇒ Object
14 15 16 17 18 |
# File 'lib/ariranha/drivers/base_driver.rb', line 14 def backup puts "running #{backup_cmd}..." _out, _err, _status = Open3.capture3(*backup_cmd) filename end |