Sha256: a78e4d520657cb03835384211b6d68443bc19587693aacbbf8495fae77e1346c
Contents?: true
Size: 744 Bytes
Versions: 15
Compression:
Stored size: 744 Bytes
Contents
class Ey::Core::Client::Backup < Ey::Core::Model extend Ey::Core::Associations identity :id attribute :metadata attribute :created_at, type: :time attribute :updated_at, type: :time attribute :finished_at, type: :time has_one :cluster has_many :files, key: :backup_files def save! requires :collection params = { "url" => self.collection.url, "backup" => { "metadata" => self.metadata, }, } if new_record? merge_attributes(self.connection.create_backup(params).body["backup"]) else raise NotImplementedError # update end end def finish! requires :id merge_attributes(self.connection.finish_backup("id" => self.identity).body["backup"]) end end
Version data entries
15 entries across 15 versions & 1 rubygems