Class: FileWriter

Inherits:
FileProcessor show all
Defined in:
lib/notroff/io.rb,
lib/notroff/processor.rb

Instance Method Summary collapse

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