Exception: STesterException
- Defined in:
- lib/s_tester_exception.rb
Instance Attribute Summary collapse
-
#comparator ⇒ Object
readonly
Returns the value of attribute comparator.
-
#expected_result ⇒ Object
readonly
Returns the value of attribute expected_result.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, comparator, expected_result) ⇒ STesterException
constructor
A new instance of STesterException.
- #message ⇒ Object
Constructor Details
#initialize(value, comparator, expected_result) ⇒ STesterException
Returns a new instance of STesterException.
5 6 7 |
# File 'lib/s_tester_exception.rb', line 5 def initialize value, comparator, expected_result @value, @comparator, @expected_result = value, comparator, expected_result end |
Instance Attribute Details
#comparator ⇒ Object (readonly)
Returns the value of attribute comparator.
3 4 5 |
# File 'lib/s_tester_exception.rb', line 3 def comparator @comparator end |
#expected_result ⇒ Object (readonly)
Returns the value of attribute expected_result.
3 4 5 |
# File 'lib/s_tester_exception.rb', line 3 def expected_result @expected_result end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/s_tester_exception.rb', line 3 def value @value end |
Instance Method Details
#message ⇒ Object
9 10 11 |
# File 'lib/s_tester_exception.rb', line 9 def "Sorry bro, #{value} is not #{comparator} to #{expected_result}. Fix it!" end |