Class: Ppl::Adapter::EmailScraper::Mail

Inherits:
Object
  • Object
show all
Defined in:
lib/ppl/adapter/email_scraper/mail.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#storage_adapter=(value) ⇒ Object (writeonly)

Sets the attribute storage_adapter

Parameters:

  • value

    the value to set the attribute storage_adapter to.



5
6
7
# File 'lib/ppl/adapter/email_scraper/mail.rb', line 5

def storage_adapter=(value)
  @storage_adapter = value
end

Instance Method Details

#scrape_contacts(message) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ppl/adapter/email_scraper/mail.rb', line 7

def scrape_contacts(message)
  email = Mail.new(message)
  contacts = []

  sender = scrape_sender(email)
  unless sender.nil?
    contacts << sender
  end

  contacts
end