Class: RubyFriendlyError::Renderers::ExceptionRenderer
- Inherits:
-
Object
- Object
- RubyFriendlyError::Renderers::ExceptionRenderer
- Defined in:
- lib/ruby_friendly_error/renderers/exception_renderer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#eval_file_content ⇒ Object
readonly
Returns the value of attribute eval_file_content.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
-
#initialize(exception, eval_file_content) ⇒ ExceptionRenderer
constructor
A new instance of ExceptionRenderer.
- #render ⇒ Object
Constructor Details
#initialize(exception, eval_file_content) ⇒ ExceptionRenderer
Returns a new instance of ExceptionRenderer.
8 9 10 11 |
# File 'lib/ruby_friendly_error/renderers/exception_renderer.rb', line 8 def initialize exception, eval_file_content @exception = exception @eval_file_content = eval_file_content end |
Instance Attribute Details
#eval_file_content ⇒ Object (readonly)
Returns the value of attribute eval_file_content.
6 7 8 |
# File 'lib/ruby_friendly_error/renderers/exception_renderer.rb', line 6 def eval_file_content @eval_file_content end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
5 6 7 |
# File 'lib/ruby_friendly_error/renderers/exception_renderer.rb', line 5 def exception @exception end |
Instance Method Details
#render ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/ruby_friendly_error/renderers/exception_renderer.rb', line 13 def render display_backtrace exception.backtrace unless eval? display_error_detail end |