Exception: TriviaCrack::Errors::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- TriviaCrack::Errors::RequestError
- Defined in:
- lib/triviacrack/errors/request_error.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Public: The response body that was returned by the Trivia Crack server.
-
#code ⇒ Object
readonly
Public: The HTTP status code returned by the Trivia Crack server.
-
#url ⇒ Object
readonly
Public: The URL that was requested.
Instance Method Summary collapse
-
#initialize(code, url, body) ⇒ RequestError
constructor
Public: Initializes a RequestError.
Constructor Details
#initialize(code, url, body) ⇒ RequestError
Public: Initializes a RequestError.
code - The HTTP status code returned by the Trivia Crack server. url - The URL that was requested. body - The response body that was returned by the Trivia Crack server.
21 22 23 24 25 |
# File 'lib/triviacrack/errors/request_error.rb', line 21 def initialize(code, url, body) @code = code @url = url @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Public: The response body that was returned by the Trivia Crack server.
14 15 16 |
# File 'lib/triviacrack/errors/request_error.rb', line 14 def body @body end |
#code ⇒ Object (readonly)
Public: The HTTP status code returned by the Trivia Crack server.
8 9 10 |
# File 'lib/triviacrack/errors/request_error.rb', line 8 def code @code end |
#url ⇒ Object (readonly)
Public: The URL that was requested.
11 12 13 |
# File 'lib/triviacrack/errors/request_error.rb', line 11 def url @url end |