Sha256: d423f6960230326d01d37990dd22c4fbbc1e39b8cb4a22ec8d93c05828c1c8d0

Contents?: true

Size: 488 Bytes

Versions: 11

Compression:

Stored size: 488 Bytes

Contents

require 'fog/core/collection'
require 'fog/aws/models/glacier/vault'

module Fog
  module AWS
    class Glacier

      class Vaults < Fog::Collection

        model Fog::AWS::Glacier::Vault

        def all
          data = connection.list_vaults.body['VaultList']
          load(data)
        end

        def get(key)
          data = connection.describe_vault(key).body
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

11 entries across 11 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/aws/models/glacier/vaults.rb
fog-nirvanix-1.8.1 lib/fog/aws/models/glacier/vaults.rb
fog-parser-fix-1.6.1 lib/fog/aws/models/glacier/vaults.rb
fog-test-again-1.6.0 lib/fog/aws/models/glacier/vaults.rb
fog-parser-fix-1.6.0 lib/fog/aws/models/glacier/vaults.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/aws/models/glacier/vaults.rb
fog-sgonyea-1.8.1 lib/fog/aws/models/glacier/vaults.rb
fog-1.8.0 lib/fog/aws/models/glacier/vaults.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/aws/models/glacier/vaults.rb
fog-1.7.0 lib/fog/aws/models/glacier/vaults.rb
fog-1.6.0 lib/fog/aws/models/glacier/vaults.rb