Class: Rmsgen::IMAPPolnoteGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/rmsgen/imap_polnote_group.rb

Instance Method Summary collapse

Constructor Details

#initialize(imap_client) ⇒ IMAPPolnoteGroup

Returns a new instance of IMAPPolnoteGroup.



4
5
6
# File 'lib/rmsgen/imap_polnote_group.rb', line 4

def initialize(imap_client)
  @imap_client = imap_client
end

Instance Method Details

#allObject



8
9
10
11
12
# File 'lib/rmsgen/imap_polnote_group.rb', line 8

def all
  @imap_client.fetch_polnote_messages_from_inbox do |body, id|
    Polnote.new :body => body, :id => id
  end
end

#archive_polnote(id) ⇒ Object



19
20
21
22
23
# File 'lib/rmsgen/imap_polnote_group.rb', line 19

def archive_polnote(id)
  @imap_client.authenticate 
  follow_inbox
  move_to_archives(id)
end

#find(id) ⇒ Object



14
15
16
17
# File 'lib/rmsgen/imap_polnote_group.rb', line 14

def find(id)
  follow_inbox
  fetch_message_body(id)
end