Class: RenderSync::Renderer
- Inherits:
-
Object
- Object
- RenderSync::Renderer
- Defined in:
- lib/render_sync/renderer.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize ⇒ Renderer
constructor
A new instance of Renderer.
- #render_to_string(options) ⇒ Object
Constructor Details
#initialize ⇒ Renderer
Returns a new instance of Renderer.
6 7 8 9 10 11 12 13 |
# File 'lib/render_sync/renderer.rb', line 6 def initialize self.context = ApplicationController.new.view_context self.context.instance_eval do def ActionMailer::Base. end end end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
4 5 6 |
# File 'lib/render_sync/renderer.rb', line 4 def context @context end |
Instance Method Details
#render_to_string(options) ⇒ Object
15 16 17 |
# File 'lib/render_sync/renderer.rb', line 15 def render_to_string() context.render() end |