Module: Rudy::Backups

Extended by:
Backups, Huxtable, Metadata::ClassMethods
Includes:
Huxtable
Included in:
Backups
Defined in:
lib/rudy/backups.rb,
lib/rudy/exceptions.rb

Defined Under Namespace

Classes: NoBackup, NoDisk

Constant Summary collapse

RTYPE =
'back'.freeze

Instance Method Summary collapse

Methods included from Metadata::ClassMethods

any?, list, list_as_hash

Methods included from Huxtable

config, config_dirname, create_domain, current_group_name, current_machine_address, current_machine_bucket, current_machine_count, current_machine_group, current_machine_hostname, current_machine_image, current_machine_name, current_machine_os, current_machine_size, current_machine_user, current_user_keypairname, current_user_keypairpath, defined_keypairpath, domain, domain_exists?, global, keypair_path_to_name, known_machine_group?, ld, ld, le, le, li, li, logger, reset_config, reset_global, root_keypairname, root_keypairpath, update_config, update_global, update_logger, user_keypairname, user_keypairpath

Instance Method Details

#from_hash(h) ⇒ Object



19
20
21
# File 'lib/rudy/backups.rb', line 19

def from_hash(h)
  Rudy::Backup.from_hash h
end

#get(path) ⇒ Object

Returns the most recent backup object for the given path



12
13
14
15
16
17
# File 'lib/rudy/backups.rb', line 12

def get(path)
  tmp = Rudy::Backup.new path
  backups = Rudy::Backups.list :path => path
  return nil unless backups.is_a?(Array) && !backups.empty?
  backups.first
end