Module: Olm

Extended by:
Olm
Included in:
Olm
Defined in:
lib/olm.rb,
lib/olm/app.rb

Defined Under Namespace

Classes: App

Constant Summary collapse

VERSION =
'0.1.3'

Instance Method Summary collapse

Instance Method Details

#appObject



8
9
10
# File 'lib/olm.rb', line 8

def app
  Olm::App.instance
end

#create_forward_message(entry_id) ⇒ Object



57
58
59
60
# File 'lib/olm.rb', line 57

def create_forward_message(entry_id)
  forward_mail_entry_id = app.create_forward_message(entry_id)
  message(forward_mail_entry_id)
end

#create_reply_all_message(entry_id) ⇒ Object



52
53
54
55
# File 'lib/olm.rb', line 52

def create_reply_all_message(entry_id)
  reply_mail_entry_id = app.create_reply_all_message(entry_id)
  message(reply_mail_entry_id)
end

#default_folder_idObject



12
13
14
# File 'lib/olm.rb', line 12

def default_folder_id
  puts app.default_folder.EntryID
end

#deleted_items_folder_idObject



16
17
18
# File 'lib/olm.rb', line 16

def deleted_items_folder_id
  puts app.deleted_items_folder.EntryID
end

#execute_refileObject



82
83
84
# File 'lib/olm.rb', line 82

def execute_refile
  app.execute_refile(ARGF)
end

#ls(folder_id = nil) ⇒ Object



20
21
22
23
24
# File 'lib/olm.rb', line 20

def ls(folder_id = nil)
  app.ls(folder_id).each do |line|
    $stdout.puts(line)
  end
end

#mark_as_read(entry_id) ⇒ Object



40
41
42
# File 'lib/olm.rb', line 40

def mark_as_read(entry_id)
  app.mark_as_read(entry_id)
end

#message(entry_id) ⇒ Object



30
31
32
33
34
# File 'lib/olm.rb', line 30

def message(entry_id)
  app.message(entry_id).each do |line|
    $stdout.puts line
  end
end

#save_attachments(entry_id, path) ⇒ Object



78
79
80
# File 'lib/olm.rb', line 78

def save_attachments(entry_id, path)
  app.save_attachments(entry_id, path)
end

#save_messageObject



44
45
46
# File 'lib/olm.rb', line 44

def save_message
  app.create_message(ARGF).Save
end

#send_and_receiveObject



26
27
28
# File 'lib/olm.rb', line 26

def send_and_receive
  app.send_and_receive
end

#send_messageObject



48
49
50
# File 'lib/olm.rb', line 48

def send_message
  app.create_message(ARGF).Send
end

#toggle_task_flag(entry_id) ⇒ Object



36
37
38
# File 'lib/olm.rb', line 36

def toggle_task_flag(entry_id)
  app.toggle_task_flag(entry_id)
end

#update_forward_message_body_and_saveObject



70
71
72
# File 'lib/olm.rb', line 70

def update_forward_message_body_and_save
  app.update_forward_message_body(ARGF).Save
end

#update_forward_message_body_and_sendObject



74
75
76
# File 'lib/olm.rb', line 74

def update_forward_message_body_and_send
  app.update_forward_message_body(ARGF).Send
end

#update_message_body_and_saveObject



62
63
64
# File 'lib/olm.rb', line 62

def update_message_body_and_save
  app.update_message_body(ARGF).Save
end

#update_message_body_and_sendObject



66
67
68
# File 'lib/olm.rb', line 66

def update_message_body_and_send
  app.update_message_body(ARGF).Send
end