Exception: Propr::Failure
Instance Attribute Summary collapse
-
#counterex ⇒ Object
readonly
Returns the value of attribute counterex.
-
#passed ⇒ Object
readonly
Returns the value of attribute passed.
-
#shrunken ⇒ Object
readonly
Returns the value of attribute shrunken.
-
#skipped ⇒ Object
readonly
Returns the value of attribute skipped.
Instance Method Summary collapse
- #backtrace ⇒ Object
- #class ⇒ Object
-
#initialize(exception, counterex, shrunken, passed, skipped) ⇒ Failure
constructor
A new instance of Failure.
- #to_s ⇒ Object (also: #message)
Constructor Details
#initialize(exception, counterex, shrunken, passed, skipped) ⇒ Failure
Returns a new instance of Failure.
55 56 57 58 |
# File 'lib/propr.rb', line 55 def initialize(exception, counterex, shrunken, passed, skipped) @exception, @counterex, @shrunken, @passed, @skipped = exception, counterex, shrunken, passed, skipped end |
Instance Attribute Details
#counterex ⇒ Object (readonly)
Returns the value of attribute counterex.
53 54 55 |
# File 'lib/propr.rb', line 53 def counterex @counterex end |
#passed ⇒ Object (readonly)
Returns the value of attribute passed.
53 54 55 |
# File 'lib/propr.rb', line 53 def passed @passed end |
#shrunken ⇒ Object (readonly)
Returns the value of attribute shrunken.
53 54 55 |
# File 'lib/propr.rb', line 53 def shrunken @shrunken end |
#skipped ⇒ Object (readonly)
Returns the value of attribute skipped.
53 54 55 |
# File 'lib/propr.rb', line 53 def skipped @skipped end |
Instance Method Details
#backtrace ⇒ Object
72 73 74 |
# File 'lib/propr.rb', line 72 def backtrace @exception.backtrace end |
#class ⇒ Object
68 69 70 |
# File 'lib/propr.rb', line 68 def class @exception.class end |
#to_s ⇒ Object Also known as: message
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/propr.rb', line 76 def to_s if @shrunken.nil? [@exception., "input: #{counterex.map(&:inspect).join(", ")}", "after: #{@passed} passed, #{@skipped} skipped"].join("\n") else [@exception., "input: #{counterex.map(&:inspect).join(", ")}", "shrunken: #{shrunken.map(&:inspect).join(", ")}", "after: #{@passed} passed, #{@skipped} skipped"].join("\n") end end |