Class: Fog::Compute::DigitalOcean::SshKey
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::DigitalOcean::SshKey
- Defined in:
- lib/fog/compute/digitalocean/models/ssh_key.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
16 17 18 19 |
# File 'lib/fog/compute/digitalocean/models/ssh_key.rb', line 16 def destroy requires :id service.delete_ssh_key id end |
#save ⇒ Object
10 11 12 13 14 |
# File 'lib/fog/compute/digitalocean/models/ssh_key.rb', line 10 def save requires :name, :public_key merge_attributes(service.create_ssh_key(name, public_key).body['ssh_key']) true end |
#update ⇒ Object
21 22 23 24 25 26 |
# File 'lib/fog/compute/digitalocean/models/ssh_key.rb', line 21 def update requires :id, :name data = service.update_server(id, name) merge_attributes(data.body['ssh_key']) true end |