Class: ActiveError::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/active_error/renderer.rb

Instance Method Summary collapse

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

#bodyObject



10
11
12
# File 'lib/active_error/renderer.rb', line 10

def body
  @body ||= template.render(template: file, layout: "rescues/layout")
end