Sha256: 068c05181c2701fb8b5c0636e5da0e8ecc9a61d2314c35c2cf2536ebcf47988e

Contents?: true

Size: 408 Bytes

Versions: 31

Compression:

Stored size: 408 Bytes

Contents

module Awspec::Type
  class S3 < Base
    def initialize(id)
      super
      @resource = find_bucket(id)
      @id = id if @resource
    end

    def has_object?(key)
      res = @s3_client.head_object({
                                     bucket: @id,
                                     key: key.sub(%r(\A/), '')
                                   })
      res
    rescue
      false
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
awspec-0.22.1 lib/awspec/type/s3.rb
awspec-0.22.0 lib/awspec/type/s3.rb
awspec-0.21.6 lib/awspec/type/s3.rb
awspec-0.21.5 lib/awspec/type/s3.rb
awspec-0.21.4 lib/awspec/type/s3.rb
awspec-0.21.3 lib/awspec/type/s3.rb
awspec-0.21.2 lib/awspec/type/s3.rb
awspec-0.21.1 lib/awspec/type/s3.rb
awspec-0.21.0 lib/awspec/type/s3.rb
awspec-0.20.2 lib/awspec/type/s3.rb
awspec-0.20.1 lib/awspec/type/s3.rb
awspec-0.20.0 lib/awspec/type/s3.rb
awspec-0.19.0 lib/awspec/type/s3.rb
awspec-0.18.2 lib/awspec/type/s3.rb
awspec-0.18.1 lib/awspec/type/s3.rb
awspec-0.18.0 lib/awspec/type/s3.rb
awspec-0.17.1 lib/awspec/type/s3.rb
awspec-0.17.0 lib/awspec/type/s3.rb
awspec-0.16.0 lib/awspec/type/s3.rb
awspec-0.15.0 lib/awspec/type/s3.rb