Class: ActiveError::ExceptionMock::TemplateError
- Inherits:
-
ActionView::Template::Error
- Object
- ActionView::Template::Error
- ActiveError::ExceptionMock::TemplateError
- Defined in:
- lib/active_error/exception_mock/template_error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #class ⇒ Object
-
#initialize(fault:) ⇒ TemplateError
constructor
A new instance of TemplateError.
Constructor Details
#initialize(fault:) ⇒ TemplateError
Returns a new instance of TemplateError.
8 9 10 11 12 13 14 15 |
# File 'lib/active_error/exception_mock/template_error.rb', line 8 def initialize(fault:) @klass = fault.klass set_backtrace(fault.backtrace) @message = fault. @blamed_files = fault.blamed_files @template = fault.template @cause = ExceptionMock.make(fault: fault.cause) end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
21 22 23 |
# File 'lib/active_error/exception_mock/template_error.rb', line 21 def @message end |
Instance Method Details
#class ⇒ Object
17 18 19 |
# File 'lib/active_error/exception_mock/template_error.rb', line 17 def class klass.constantize end |