Class: Fyodor::OutputGenerator

Inherits:
Object
  • Object
show all
Includes:
Strings
Defined in:
lib/fyodor/output_generator.rb

Constant Summary

Constants included from Strings

Strings::PLURAL, Strings::SINGULAR

Instance Method Summary collapse

Constructor Details

#initialize(book, config, params = {}) ⇒ OutputGenerator

Returns a new instance of OutputGenerator.



8
9
10
11
12
# File 'lib/fyodor/output_generator.rb', line 8

def initialize(book, config, params={})
  @book = book
  @config = config
  @params = params
end

Instance Method Details

#outputObject



14
15
16
# File 'lib/fyodor/output_generator.rb', line 14

def output
  ERB.new(@config["template"], trim_mode: '-').result(binding)
end