Class: GmailExtractor::FilePrinter
- Inherits:
-
Object
- Object
- GmailExtractor::FilePrinter
- Defined in:
- lib/gmail_extractor/printer/file_printer.rb
Instance Method Summary collapse
- #<<(string) ⇒ Object
- #close ⇒ Object
-
#initialize(output_file) ⇒ FilePrinter
constructor
A new instance of FilePrinter.
Constructor Details
#initialize(output_file) ⇒ FilePrinter
Returns a new instance of FilePrinter.
5 6 7 8 |
# File 'lib/gmail_extractor/printer/file_printer.rb', line 5 def initialize(output_file) @output_file = File.open(output_file,"w:utf-8") @output_file.sync = true end |
Instance Method Details
#<<(string) ⇒ Object
10 11 12 |
# File 'lib/gmail_extractor/printer/file_printer.rb', line 10 def << (string) @output_file << string end |
#close ⇒ Object
14 15 16 |
# File 'lib/gmail_extractor/printer/file_printer.rb', line 14 def close @output_file.close end |