Class: Weibo2::Error
- Inherits:
-
OAuth2::Error
- Object
- OAuth2::Error
- Weibo2::Error
- Defined in:
- lib/weibo2/error.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 9 10 11 |
# File 'lib/weibo2/error.rb', line 4 def initialize(response) response.error = self @response = response if response.parsed.is_a?(Hash) @code = response.parsed['error_code'] @description = response.parsed['error'] end end |