Class: ActiveError::Renderer
- Inherits:
-
Object
- Object
- ActiveError::Renderer
- Defined in:
- lib/active_error/renderer.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(instance:) ⇒ Renderer
constructor
A new instance of Renderer.
Constructor Details
#initialize(instance:) ⇒ Renderer
Returns a new instance of Renderer.
5 6 7 8 |
# File 'lib/active_error/renderer.rb', line 5 def initialize(instance:) @instance = instance @exception = instance.fault.exception end |
Instance Method Details
#body ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/active_error/renderer.rb', line 10 def body @body ||= begin set_lookup_context template.render(template: file, layout: "active_error/rescue") end end |