Class: Docs::ERBRenderer
- Inherits:
-
Object
- Object
- Docs::ERBRenderer
- Defined in:
- lib/docs/erb_renderer.rb
Instance Method Summary collapse
-
#initialize(erb_environment) ⇒ ERBRenderer
constructor
A new instance of ERBRenderer.
- #render(str) ⇒ Object
Constructor Details
#initialize(erb_environment) ⇒ ERBRenderer
Returns a new instance of ERBRenderer.
6 7 8 |
# File 'lib/docs/erb_renderer.rb', line 6 def initialize(erb_environment) @erb_environment = erb_environment end |
Instance Method Details
#render(str) ⇒ Object
10 11 12 |
# File 'lib/docs/erb_renderer.rb', line 10 def render(str) ERB.new(str).result(@erb_environment.get_binding) end |