class Resync::BaseChangeList
Adds useful methods to {ChangeList} and {ChangeDumpManifest}.
Public Instance Methods
changes(of_type: nil, in_range: nil)
click to toggle source
Filters the list of changes by change type, modification time, or both. @param of_type [Types::Change] the change type @param in_range [Range<Time>] the range of modification times @return [Array<Resource>] the matching changes, or all changes
if neither +of_type+ nor +in_range+ is specified.
# File lib/resync/shared/base_change_list.rb, line 11 def changes(of_type: nil, in_range: nil) resources.select do |r| is_of_type = of_type ? r.change == of_type : true is_in_range = in_range ? in_range.cover?(r.modified_time) : true is_of_type && is_in_range end end