Exception: DuckSearch::HttpError
- Defined in:
- lib/duck_search/errors.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, url: nil) ⇒ HttpError
constructor
A new instance of HttpError.
Constructor Details
#initialize(message = nil, status: nil, url: nil) ⇒ HttpError
Returns a new instance of HttpError.
7 8 9 10 11 |
# File 'lib/duck_search/errors.rb', line 7 def initialize( = nil, status: nil, url: nil) @status = status @url = url super( || "DuckDuckGo request failed (HTTP #{status})") end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/duck_search/errors.rb', line 5 def status @status end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/duck_search/errors.rb', line 5 def url @url end |