Class: Ey::Core::Client::Application

Inherits:
Model
  • Object
show all
Extended by:
Associations
Defined in:
lib/ey-core/models/application.rb

Instance Method Summary collapse

Methods included from Associations

assoc_accessor, assoc_coverage, assoc_reader, assoc_writer, associations, collection_reader

Methods inherited from Model

#destroy, range_parser, #save, #to_s, #update!, #url

Instance Method Details

#save!Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ey-core/models/application.rb', line 17

def save!
  params = {
    "url"         => self.collection.url,
    "account"     => self.,
    "application" => {
      "name"       => self.name,
      "type"       => self.type,
      "repository" => self.repository,
    },
  }

  if new_record?
    merge_attributes(self.connection.create_application(params).body["application"])
  else raise NotImplementedError # update
  end
end