Class: Redwood::SentLoader

Inherits:
MBox::Loader show all
Defined in:
lib/sup/sent.rb

Instance Attribute Summary

Attributes inherited from Source

#cur_offset

Instance Method Summary collapse

Methods inherited from MBox::Loader

#check, #each_raw_message_line, #end_offset, #is_source_for?, #load_header, #load_message, #next, #raw_header, #raw_message, #start_offset, suggest_labels_for

Methods inherited from Source

#==, #check, #done?, #each, #is_source_for?, #reset!, #seek_to!, #usual

Constructor Details

#initialize(cur_offset = 0) ⇒ SentLoader

Returns a new instance of SentLoader.



36
37
38
39
40
# File 'lib/sup/sent.rb', line 36

def initialize cur_offset=0
  @filename = Redwood::SENT_FN
  File.open(@filename, "w") { } unless File.exists? @filename
  super "mbox://" + @filename, cur_offset, true, true
end

Instance Method Details

#file_pathObject



42
# File 'lib/sup/sent.rb', line 42

def file_path; @filename end

#idObject



46
# File 'lib/sup/sent.rb', line 46

def id; SentManager.source_id; end

#labelsObject



47
# File 'lib/sup/sent.rb', line 47

def labels; [:sent, :inbox]; end

#to_sObject



45
# File 'lib/sup/sent.rb', line 45

def to_s; SentManager.source_name; end

#uriObject



44
# File 'lib/sup/sent.rb', line 44

def uri; SentManager.source_name; end