Class: Resync::ChangeDumpIndex

Inherits:
Object
  • Object
show all
Includes:
Resync::Client::Mixins::DumpIndex
Defined in:
lib/resync/client/mixins/dump_index.rb

Instance Attribute Summary

Attributes included from Resync::Client::Mixins::ClientDelegator

#client_delegate

Instance Method Summary collapse

Methods included from Resync::Client::Mixins::ResourceClientDelegate

#resources=

Methods included from Resync::Client::Mixins::ClientDelegator

#client, #client=

Instance Method Details

#all_zip_packages(in_range: nil) ⇒ Enumerator::Lazy<Resync::Client::Zip::ZipPackage>

Downloads and parses each resource list and returns a flattened enumeration of all zip packages in each contained list. Each contained list is only downloaded as needed, and only downloaded once. If a time range parameter is provided, the lists of packages is filtered by from_time and until_time, in non-strict mode (only excluding those lists provably not in the range, i.e., including packages without from_time or until_time).

Parameters:

  • in_range (Range<Time>) (defaults to: nil)

    the range of times to filter by

Returns:



47
48
49
50
51
52
53
54
# File 'lib/resync/client/mixins/dump_index.rb', line 47

def all_zip_packages(in_range: nil)
  if in_range
    dump_resources = change_lists(in_range: in_range, strict: false)
    dump_resources.lazy.flat_map { |cl| package_for(cl, in_range: in_range) }
  else
    super()
  end
end