Class: GmailExtractor::ConsolePrinter
- Inherits:
-
Object
- Object
- GmailExtractor::ConsolePrinter
- Defined in:
- lib/gmail_extractor/printer/console_printer.rb
Instance Method Summary collapse
- #<<(string) ⇒ Object
- #close ⇒ Object
-
#initialize(printer = nil) ⇒ ConsolePrinter
constructor
A new instance of ConsolePrinter.
Constructor Details
#initialize(printer = nil) ⇒ ConsolePrinter
Returns a new instance of ConsolePrinter.
5 6 7 |
# File 'lib/gmail_extractor/printer/console_printer.rb', line 5 def initialize(printer = nil) @printer = printer end |
Instance Method Details
#<<(string) ⇒ Object
9 10 11 12 |
# File 'lib/gmail_extractor/printer/console_printer.rb', line 9 def << (string) puts string @printer << string if printer? end |
#close ⇒ Object
14 15 16 |
# File 'lib/gmail_extractor/printer/console_printer.rb', line 14 def close @printer.close if printer? end |