Class: Yadriggy::FilePrinter
Overview
Pretty printer to a file.
Instance Attribute Summary collapse
-
#file_name ⇒ String
readonly
The file name.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(file_name) ⇒ FilePrinter
constructor
A new instance of FilePrinter.
Methods inherited from Printer
Constructor Details
#initialize(file_name) ⇒ FilePrinter
Returns a new instance of FilePrinter.
72 73 74 75 76 |
# File 'lib/yadriggy/printer.rb', line 72 def initialize(file_name) super() @text = File.open(file_name, 'w') @file_name = file_name end |
Instance Attribute Details
#file_name ⇒ String (readonly)
Returns the file name.
69 70 71 |
# File 'lib/yadriggy/printer.rb', line 69 def file_name @file_name end |
Instance Method Details
#close ⇒ Object
78 79 80 |
# File 'lib/yadriggy/printer.rb', line 78 def close @text.close end |