Class: Fyodor::OutputWriter
- Inherits:
-
Object
- Object
- Fyodor::OutputWriter
- Includes:
- Strings
- Defined in:
- lib/fyodor/output_writer.rb
Constant Summary
Constants included from Strings
Strings::PLURAL, Strings::SINGULAR
Instance Method Summary collapse
-
#initialize(book, output_dir, config) ⇒ OutputWriter
constructor
A new instance of OutputWriter.
- #write ⇒ Object
Constructor Details
#initialize(book, output_dir, config) ⇒ OutputWriter
Returns a new instance of OutputWriter.
9 10 11 12 13 |
# File 'lib/fyodor/output_writer.rb', line 9 def initialize(book, output_dir, config) @book = book @output_dir = output_dir @config = config end |
Instance Method Details
#write ⇒ Object
15 16 17 18 |
# File 'lib/fyodor/output_writer.rb', line 15 def write output = OutputGenerator.new(@book, @config).output File.open(path, "w") { |f| f.puts(output) } end |