Exception: ATM::TestCaseError
- Defined in:
- lib/atm_ruby/error_handeling/test_case_error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Attributes inherited from BaseError
Instance Method Summary collapse
-
#initialize(response) ⇒ TestCaseError
constructor
A new instance of TestCaseError.
Methods inherited from BaseError
#raise_400, #raise_401, #raise_404, #raise_500
Constructor Details
#initialize(response) ⇒ TestCaseError
Returns a new instance of TestCaseError.
6 7 8 9 10 11 12 13 14 |
# File 'lib/atm_ruby/error_handeling/test_case_error.rb', line 6 def initialize(response) @response = response @message = case @response.code when 400 then raise_400 when 401 then raise_401 when 404 then raise_404('No Test Case has been found with the given key.') when 500 then raise_500 end end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/atm_ruby/error_handeling/test_case_error.rb', line 4 def @message end |