Class: Fog::Brightbox::Compute::Application

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/brightbox/models/compute/application.rb

Instance Method Summary collapse

Methods included from ModelHelper

#collection_name, #resource_name

Instance Method Details

#saveObject

Raises:

  • (Fog::Errors::Error)


18
19
20
21
22
23
24
25
26
# File 'lib/fog/brightbox/models/compute/application.rb', line 18

def save
  raise Fog::Errors::Error, "Resaving an existing object may create a duplicate" if persisted?
  options = {
    name: name
  }.delete_if { |_k, v| v.nil? || v == "" }
  data = service.create_application(options)
  merge_attributes(data)
  true
end