Class: Resync::BaseChangeIndex
- Inherits:
-
SortedResourceList
- Object
- Augmented
- BaseResourceList
- SortedResourceList
- Resync::BaseChangeIndex
- Defined in:
- lib/resync/shared/base_change_index.rb
Overview
Adds useful methods to ChangeListIndex, ChangeDumpIndex, and ChangeDump.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from SortedResourceList
Attributes inherited from BaseResourceList
Attributes inherited from Augmented
Instance Method Summary collapse
-
#change_lists(in_range:, strict: true) ⇒ Array<Resource>
Filters the list of change lists by from/until time.
Methods inherited from SortedResourceList
#all_uris, #latest_for, #resources=
Methods inherited from BaseResourceList
#capability, inherited, #initialize, #metadata=, #pre_save, #resource_for, #resources_for, #resources_in
Methods inherited from Augmented
#at_time, #change, #completed_time, #from_time, #initialize, #link_for, #links_for, #until_time
Constructor Details
This class inherits a constructor from Resync::BaseResourceList
Instance Method Details
#change_lists(in_range:, strict: true) ⇒ Array<Resource>
Filters the list of change lists by from/until time. The filter can be strict, in which case only those change lists provably in the range are included, or non-strict, in which case only those change lists provably not in the range are excluded. (This is particularly useful for ChangeDumps, where the from_time and until_time attributes on the individual bitstream packages are optional.)
17 18 19 20 21 |
# File 'lib/resync/shared/base_change_index.rb', line 17 def change_lists(in_range:, strict: true) resources.select do |r| strict ? strictly(in_range, r) : loosely(in_range, r) end end |