Class: GmailExtractor::EmailCsvFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/gmail_extractor/email_formatter/email_csv_formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(printer) ⇒ EmailCsvFormatter

Returns a new instance of EmailCsvFormatter.



9
10
11
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 9

def initialize(printer)
  @printer = printer
end

Instance Attribute Details

#printerObject

Returns the value of attribute printer.



7
8
9
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 7

def printer
  @printer
end

Instance Method Details

#email(email) ⇒ Object



17
18
19
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 17

def email(email)
  @printer << [email.date, email.from, email.content].to_csv
end


15
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 15

def footer;  end

#headerObject



13
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 13

def header;  end

#label(label, limit) ⇒ Object



21
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 21

def label(label,limit); end