Class: GmailExtractor::EmailCsvFormatter
- Inherits:
-
Object
- Object
- GmailExtractor::EmailCsvFormatter
- Defined in:
- lib/gmail_extractor/email_formatter/email_csv_formatter.rb
Instance Attribute Summary collapse
-
#printer ⇒ Object
Returns the value of attribute printer.
Instance Method Summary collapse
- #email(email) ⇒ Object
- #footer ⇒ Object
- #header ⇒ Object
-
#initialize(printer) ⇒ EmailCsvFormatter
constructor
A new instance of EmailCsvFormatter.
- #label(label, limit) ⇒ Object
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
#printer ⇒ Object
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 |
#footer ⇒ Object
15 |
# File 'lib/gmail_extractor/email_formatter/email_csv_formatter.rb', line 15 def ; end |
#header ⇒ Object
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 |