Class: RTFDoc::Template
- Inherits:
-
Object
- Object
- RTFDoc::Template
- Defined in:
- lib/rtfdoc.rb
Instance Method Summary collapse
-
#initialize(sections) ⇒ Template
constructor
A new instance of Template.
- #output ⇒ Object
Constructor Details
#initialize(sections) ⇒ Template
Returns a new instance of Template.
103 104 105 106 |
# File 'lib/rtfdoc.rb', line 103 def initialize(sections) @content = sections.map(&:output).join @menu_content = sections.map(&:menu_output).join end |
Instance Method Details
#output ⇒ Object
108 109 110 111 |
# File 'lib/rtfdoc.rb', line 108 def output template = Erubi::Engine.new(File.read(File.('../src/index.html.erb', __dir__))) eval(template.src) end |