Class: Wright::Util::MustacheRenderer Private
- Inherits:
-
Object
- Object
- Wright::Util::MustacheRenderer
- Defined in:
- lib/wright/util/mustache_renderer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Mustache renderer.
Instance Method Summary collapse
-
#initialize(hash) ⇒ MustacheRenderer
constructor
private
A new instance of MustacheRenderer.
-
#render(template) ⇒ String
private
Renders a Mustache template.
Constructor Details
#initialize(hash) ⇒ MustacheRenderer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MustacheRenderer.
18 19 20 21 |
# File 'lib/wright/util/mustache_renderer.rb', line 18 def initialize(hash) @hash = hash @mustache = select_mustache end |
Instance Method Details
#render(template) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Renders a Mustache template.
26 27 28 |
# File 'lib/wright/util/mustache_renderer.rb', line 26 def render(template) @mustache.render(template, @hash) end |