Class: Oopsy
- Inherits:
-
Object
- Object
- Oopsy
- Defined in:
- lib/rspec_html_reporter.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#backtrace_message ⇒ Object
readonly
Returns the value of attribute backtrace_message.
-
#explanation ⇒ Object
readonly
Returns the value of attribute explanation.
-
#highlighted_source ⇒ Object
readonly
Returns the value of attribute highlighted_source.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(example, file_path) ⇒ Oopsy
constructor
A new instance of Oopsy.
Constructor Details
#initialize(example, file_path) ⇒ Oopsy
Returns a new instance of Oopsy.
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rspec_html_reporter.rb', line 15 def initialize(example, file_path) @example = example @exception = @example.exception @file_path = file_path unless @exception.nil? @klass = @exception.class @message = @exception..encode('utf-8') @backtrace = @exception.backtrace @backtrace_message = formatted_backtrace(@example, @exception) @highlighted_source = process_source @explanation = end end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
13 14 15 |
# File 'lib/rspec_html_reporter.rb', line 13 def backtrace @backtrace end |
#backtrace_message ⇒ Object (readonly)
Returns the value of attribute backtrace_message.
13 14 15 |
# File 'lib/rspec_html_reporter.rb', line 13 def @backtrace_message end |
#explanation ⇒ Object (readonly)
Returns the value of attribute explanation.
13 14 15 |
# File 'lib/rspec_html_reporter.rb', line 13 def explanation @explanation end |
#highlighted_source ⇒ Object (readonly)
Returns the value of attribute highlighted_source.
13 14 15 |
# File 'lib/rspec_html_reporter.rb', line 13 def highlighted_source @highlighted_source end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
13 14 15 |
# File 'lib/rspec_html_reporter.rb', line 13 def klass @klass end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
13 14 15 |
# File 'lib/rspec_html_reporter.rb', line 13 def @message end |