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
# File 'lib/things_fetcher/mail_handler.rb', line 7

def initialize(config)
  @config = config
end

Instance Method Details

#receive(data) ⇒ Object



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

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