Module: Resync::Client::Mixins::Dump

Included in:
Resync::ChangeDump, ResourceDump
Defined in:
lib/resync/client/mixins/dump.rb

Overview

A list of resources each of which refers to a zipped bitstream package.

Instance Method Summary collapse

Instance Method Details

#resources=(value) ⇒ Object

Makes each resource a ZippedResource



13
14
15
16
17
18
19
20
21
# File 'lib/resync/client/mixins/dump.rb', line 13

def resources=(value)
  super
  resources.each do |r|
    next if r.respond_to?(:zip_package)
    class << r
      prepend ZippedResource
    end
  end
end

#zip_packagesArray<Promise<Resync::Client::Zip::ZipPackage>>

The Zip::ZipPackages for each resource, downloaded lazily

Returns:



25
26
27
# File 'lib/resync/client/mixins/dump.rb', line 25

def zip_packages
  @zip_packages ||= resources.map { |r| promise { r.zip_package } }
end