Class: Ey::Core::Client::KeypairDeployment

Inherits:
Model
  • Object
show all
Extended by:
Associations
Defined in:
lib/ey-core/models/keypair_deployment.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



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ey-core/models/keypair_deployment.rb', line 9

def save!
  requires :keypair, :environment

  params = {
    "url"         => self.collection.url,
    "keypair"     => self.keypair.identity,
    "environment" => self.environment.identity,
  }

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