Class: Prmd::Renderer
- Inherits:
-
Object
- Object
- Prmd::Renderer
- Defined in:
- lib/prmd/core/renderer.rb
Overview
Schema Generator
Instance Method Summary collapse
-
#initialize(properties = {}) ⇒ Renderer
constructor
A new instance of Renderer.
- #render(schema, options = {}) ⇒ Object
Constructor Details
#initialize(properties = {}) ⇒ Renderer
Returns a new instance of Renderer.
9 10 11 12 |
# File 'lib/prmd/core/renderer.rb', line 9 def initialize(properties = {}) @properties = properties @template = @properties.fetch(:template) end |
Instance Method Details
#render(schema, options = {}) ⇒ Object
48 49 50 |
# File 'lib/prmd/core/renderer.rb', line 48 def render(schema, = {}) @template.result(schema: schema, options: ()) end |