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)


10
11
12
13
14
15
16
17
18
# File 'lib/fog/brightbox/models/compute/application.rb', line 10

def save
  raise Fog::Errors::Error.new("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