Class: BigBackup::Database::Base
- Inherits:
-
Object
- Object
- BigBackup::Database::Base
- Defined in:
- lib/big_backup/databases/base.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build_cmd(timestamp) ⇒ Object
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/big_backup/databases/base.rb', line 5 def initialize(config) @config = config end |
Class Method Details
.build(type, config) ⇒ Object
9 10 11 |
# File 'lib/big_backup/databases/base.rb', line 9 def self.build(type, config) "BigBackup::Database::#{type.to_s.classify}".constantize.new(config) end |
Instance Method Details
#build_cmd(timestamp) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/big_backup/databases/base.rb', line 29 def build_cmd() str = String.new @config.each do |database, config| str << " && " unless str.empty? str << self.cmd_line(database, config, ) end str; end |