Sha256: af41530a86a4b9d8108fb62898db6f2e01943efa74e0b18047b66d60d4d552a6

Contents?: true

Size: 633 Bytes

Versions: 1

Compression:

Stored size: 633 Bytes

Contents

require_relative '../zip'
require_relative 'downloadable'

module Resync
  class Client
    module Mixins
      # A resource that refers to a zipped bitstream package.
      module ZippedResource
        prepend Downloadable

        # Provides the contents of this resource as a {Resync::Client::Zip::ZipPackage}, downloading
        # it to a temporary file if necessary.
        # @return [Resync::Client::Zip::ZipPackage] the zipped contents of this resource
        def zip_package
          puts self
          @zip_package ||= Resync::Client::Zip::ZipPackage.new(download_to_temp_file)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
resync-client-0.2.4 lib/resync/client/mixins/zipped_resource.rb