Module: Resync::Client::Mixins::BitstreamResource
- Defined in:
- lib/resync/client/mixins/bitstream_resource.rb
Overview
A resource that refers to a bitsream within a zipped bitstream package.
Instance Attribute Summary collapse
-
#zip_package_delegate ⇒ ZipPackage
The provider of the containing package, e.g.
Instance Method Summary collapse
-
#bitstream ⇒ Bitstream
The bitstream for this resource.
-
#containing_package ⇒ ZipPackage
The package containing the bitstream for this resource.
Instance Attribute Details
#zip_package_delegate ⇒ ZipPackage
Returns the provider of the containing package, e.g. its manifest.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/resync/client/mixins/bitstream_resource.rb', line 11 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 |
Instance Method Details
#bitstream ⇒ Bitstream
Returns the bitstream for this resource.
20 21 22 |
# File 'lib/resync/client/mixins/bitstream_resource.rb', line 20 def bitstream containing_package.bitstream_for(self) end |
#containing_package ⇒ ZipPackage
Returns the package containing the bitstream for this resource.
15 16 17 |
# File 'lib/resync/client/mixins/bitstream_resource.rb', line 15 def containing_package @zip_package_delegate.zip_package end |