Exception: Userlist::RequestError
- Defined in:
- lib/userlist.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
43 44 45 46 47 |
# File 'lib/userlist.rb', line 43 def initialize(response) super("Request failed with status #{response.code}: #{response.body}") @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
41 42 43 |
# File 'lib/userlist.rb', line 41 def response @response end |
Instance Method Details
#status ⇒ Object
49 50 51 |
# File 'lib/userlist.rb', line 49 def status @response.code.to_i end |