Class: ThingsFetcher::MailHandler

Inherits:
Object
  • Object
show all
Includes:
Appscript, OSAX
Defined in:
lib/things_fetcher/mail_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ MailHandler

Returns a new instance of MailHandler.



7
8
9
10
# File 'lib/things_fetcher/mail_handler.rb', line 7

def initialize(config)
  super
  @config = config
end

Instance Method Details

#receive(data) ⇒ Object



12
13
14
15
# File 'lib/things_fetcher/mail_handler.rb', line 12

def receive(data)
  msg = Mail.read_from_string(data)
  make_todo msg.subject
end