class Fog::Compute::ProfitBricks::Datacenter
Attributes
options[RW]
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/profitbricks/models/compute/datacenter.rb, line 28 def initialize(attributes = {}) super end
Public Instance Methods
delete()
click to toggle source
# File lib/fog/profitbricks/models/compute/datacenter.rb, line 56 def delete requires :id data = service.delete_datacenter(id) true end
save()
click to toggle source
# File lib/fog/profitbricks/models/compute/datacenter.rb, line 32 def save requires :name, :location options = {} options[:name] = name options[:location] = location options[:description] = description if description data = service.create_datacenter(options) merge_attributes(flatten(data.body)) true end
update()
click to toggle source
# File lib/fog/profitbricks/models/compute/datacenter.rb, line 45 def update requires :id options = {} options[:name] = name if name options[:description] = description if description data = service.update_datacenter(id, options) merge_attributes(flatten(data.body)) true end