Class: Fog::Compute::DigitalOcean::SshKey

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



18
19
20
21
22
23
# File 'lib/fog/digitalocean/models/compute/ssh_key.rb', line 18

def destroy
  requires :id

  service.destroy_ssh_key id
  true
end

#saveObject



11
12
13
14
15
16
# File 'lib/fog/digitalocean/models/compute/ssh_key.rb', line 11

def save
  requires :name, :ssh_pub_key

  merge_attributes(service.create_ssh_key(name, ssh_pub_key).body['ssh_key'])
  true
end