class Proforma::HtmlRenderer
This main class to use as a Proforma
renderer.
Constants
- DEFAULT_OPTIONS
- EXTENSION
- VERSION
Attributes
options[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/proforma/html_renderer.rb, line 33 def initialize(options = {}) @options = OpenStruct.new(DEFAULT_OPTIONS.merge(options)) end
Public Instance Methods
render(prototype)
click to toggle source
# File lib/proforma/html_renderer.rb, line 37 def render(prototype) contents = ProformaWriter.render(prototype, options) Proforma::Document.new( contents: contents, extension: EXTENSION, title: prototype.title ) end