Class: FileWriter
- Inherits:
-
FileProcessor
- Object
- FileProcessor
- FileWriter
- Defined in:
- lib/notroff/io.rb,
lib/notroff/processor.rb
Instance Method Summary collapse
-
#initialize(output_file) ⇒ FileWriter
constructor
A new instance of FileWriter.
- #process(content) ⇒ Object
Constructor Details
#initialize(output_file) ⇒ FileWriter
Returns a new instance of FileWriter.
11 12 13 |
# File 'lib/notroff/processor.rb', line 11 def initialize(output_file) @output_file = output_file end |
Instance Method Details
#process(content) ⇒ Object
15 16 17 |
# File 'lib/notroff/io.rb', line 15 def process(output) File.open(@path, 'w') {|f| f.write(output)} end |