Sha256: b4ad208ef515a5894a988268dd6a46f3c8a50d77b7c8c0da5664f608c15de127

Contents?: true

Size: 451 Bytes

Versions: 2

Compression:

Stored size: 451 Bytes

Contents

require 'fog/core/collection'
require 'fog/sakuracloud/models/compute/ssh_key'

module Fog
  module Compute
    class SakuraCloud

      class SshKeys < Fog::Collection
        model Fog::Compute::SakuraCloud::SshKey

        def all
          load service.list_ssh_keys.body['SSHKeys']
        end

        def get(id)
          all.find { |f| f.id == id }
        rescue Fog::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-1.22.0 lib/fog/sakuracloud/models/compute/ssh_keys.rb
fog-1.21.0 lib/fog/sakuracloud/models/compute/ssh_keys.rb