def ssl?; @parsed_uri.scheme == 'imaps' end
def check
+ return unless start_offset
+
ids =
@mutex.synchronize do
unsynchronized_scan_mailbox
synchronized :scan_mailbox
def each
+ return unless start_offset
+
ids =
@mutex.synchronize do
unsynchronized_scan_mailbox
def check
scan_mailbox
+ return unless start_offset
+
start = @ids.index(cur_offset || start_offset) or raise OutOfSyncSourceError, "Unknown message id #{cur_offset || start_offset}." # couldn't find the most recent email
end
def each
scan_mailbox
+ return unless start_offset
+
start = @ids.index(cur_offset || start_offset) or raise OutOfSyncSourceError, "Unknown message id #{cur_offset || start_offset}." # couldn't find the most recent email
start.upto(@ids.length - 1) do |i|
def seek_to! o; self.cur_offset = o; end
def reset!; seek_to! start_offset; end
def == o; o.uri == uri; end
- def done?; (self.cur_offset ||= start_offset) >= end_offset; end
+ def done?; start_offset.nil? || (self.cur_offset ||= start_offset) >= end_offset; end
def is_source_for? uri; uri == URI(uri); end
## check should throw a FatalSourceError or an OutOfSyncSourcError