Sha256: d7291794783d4e45134718777be427b25292fafd0e49da69a5dfc1ff53cb3ed2

Contents?: true

Size: 734 Bytes

Versions: 4

Compression:

Stored size: 734 Bytes

Contents

require 'resync/client/zip'

module Resync
  class Client
    module Mixins
      # A resource that refers to a bitsream within a zipped bitstream package.
      #
      # @!attribute [rw] zip_package_delegate
      #   @return [ZipPackage] the provider of the containing package,
      #     e.g. its manifest
      module BitstreamResource
        attr_accessor :zip_package_delegate

        # @return [ZipPackage] the package containing the bitstream for this resource
        def containing_package
          @zip_package_delegate.zip_package
        end

        # @return [Bitstream] the bitstream for this resource
        def bitstream
          containing_package.bitstream_for(self)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
resync-client-0.4.7 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.4.6 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.4.5 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.4.4 lib/resync/client/mixins/bitstream_resource.rb