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


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

def destroy
  requires :id

  service.destroy_ssh_key id
  true
end

#saveObject


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

def save
  requires :name, :ssh_pub_key

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