Sha256: b1f2a46ae7611bab0963052e2b0761237880ec865182afb6bb1cf9270353fd71

Contents?: true

Size: 732 Bytes

Versions: 12

Compression:

Stored size: 732 Bytes

Contents

require_relative '../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

12 entries across 12 versions & 1 rubygems

Version Path
resync-client-0.4.3 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.4.2 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.4.1 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.4.0 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.3.5 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.3.4 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.3.3 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.3.2 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.3.1 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.3.0 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.2.5 lib/resync/client/mixins/bitstream_resource.rb
resync-client-0.2.4 lib/resync/client/mixins/bitstream_resource.rb