Class: Savior

Inherits:
Object
  • Object
show all
Defined in:
lib/savior.rb,
lib/savior/storage.rb,
lib/savior/database.rb

Defined Under Namespace

Classes: Database, Storage

Instance Method Summary collapse

Instance Method Details

#database(options) ⇒ Object

load db configuration



6
7
8
# File 'lib/savior.rb', line 6

def database(options)
  @db = Savior::Database.new(options)
end

#saveObject



15
16
17
18
19
# File 'lib/savior.rb', line 15

def save
  check_configuration
  db_snapshot_file = @db.create_snapshot
  @storage.upload_file(db_snapshot_file, true)
end

#storage(options) ⇒ Object

load aws configuration



11
12
13
# File 'lib/savior.rb', line 11

def storage(options)
  @storage =  Savior::Storage.new(options)
end