class Brightbox::DatabaseSnapshot
Public Class Methods
Source
# File lib/brightbox-cli/database_snapshot.rb, line 7 def self.all conn.database_snapshots.all end
Source
# File lib/brightbox-cli/database_snapshot.rb, line 25 def self.default_field_order %i[id status created_on size name] end
Source
# File lib/brightbox-cli/database_snapshot.rb, line 11 def self.get(id) conn.database_snapshots.get(id) end
Source
# File lib/brightbox-cli/database_snapshot.rb, line 3 def self.require_account? true end
Public Instance Methods
Source
# File lib/brightbox-cli/database_snapshot.rb, line 21 def destroy fog_model.destroy end
Source
# File lib/brightbox-cli/database_snapshot.rb, line 29 def to_row fog_attributes.merge( status: fog_model.state, locked: locked?, created_on: fog_model.created_at.strftime("%Y-%m-%d") ) end
Source
# File lib/brightbox-cli/database_snapshot.rb, line 15 def update(options) self.class.conn.update_database_snapshot(id, options) reload self end