Class: Fog::Compute::DigitalOcean::SshKeys

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/digitalocean/models/compute/ssh_keys.rb

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.list_ssh_keys.body['ssh_keys']
  load(data)
end

#get(uri) ⇒ Object



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

def get(uri)
  data = service.get_ssh_key(uri).body['ssh_key']
  new(data)
rescue Fog::Errors::NotFound
  nil
end