Class: StellarCoreBackup::Database
- Inherits:
-
Object
- Object
- StellarCoreBackup::Database
- Includes:
- Contracts
- Defined in:
- lib/stellar-core-backup/database.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dbname ⇒ Object
readonly
Returns the value of attribute dbname.
Instance Method Summary collapse
- #backup ⇒ Object
-
#initialize(config) ⇒ Database
constructor
A new instance of Database.
Constructor Details
#initialize(config) ⇒ Database
Returns a new instance of Database.
10 11 12 13 14 |
# File 'lib/stellar-core-backup/database.rb', line 10 def initialize(config) @config = config @working_dir = StellarCoreBackup::Utils.create_working_dir(@config.get('working_dir')) @dbname = check_db_connection end |
Instance Attribute Details
#dbname ⇒ Object (readonly)
Returns the value of attribute dbname.
7 8 9 |
# File 'lib/stellar-core-backup/database.rb', line 7 def dbname @dbname end |
Instance Method Details
#backup ⇒ Object
17 18 19 |
# File 'lib/stellar-core-backup/database.rb', line 17 def backup() pg_dump() end |