Exception: Cocoafish::CocoafishError
- Inherits:
-
StandardError
- Object
- StandardError
- Cocoafish::CocoafishError
- Defined in:
- lib/cocoafish.rb
Instance Method Summary collapse
- #http_code ⇒ Object
-
#initialize(e) ⇒ CocoafishError
constructor
A new instance of CocoafishError.
- #response ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(e) ⇒ CocoafishError
Returns a new instance of CocoafishError.
17 18 19 |
# File 'lib/cocoafish.rb', line 17 def initialize(e) @re = e end |
Instance Method Details
#http_code ⇒ Object
26 27 28 |
# File 'lib/cocoafish.rb', line 26 def http_code @re.http_code end |
#response ⇒ Object
30 31 32 |
# File 'lib/cocoafish.rb', line 30 def response @re.response end |
#to_s ⇒ Object
21 22 23 24 |
# File 'lib/cocoafish.rb', line 21 def to_s content = JSON.parse(@re.response) "#{@re.} - #{content['meta']['message']}" end |