Sha256: ed00832f1d2825a9b9955bb43b238b9d63f3cb18fbbc5e8004f352249e77511e
Contents?: true
Size: 409 Bytes
Versions: 17
Compression:
Stored size: 409 Bytes
Contents
class ModifiedFilter def initialize(file_class, last_modified = nil) @file_class = file_class @last_modified = last_modified @modifieds = [] end def filter(path) modified = @file_class.mtime(path) @modifieds << modified return @last_modified.nil? || modified > @last_modified end def complete @last_modified = @modifieds.max @modifieds = [] end end
Version data entries
17 entries across 17 versions & 2 rubygems