Exception: Embedly::BadResponseException
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Embedly::BadResponseException
- Defined in:
- lib/embedly/exceptions.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, path = nil) ⇒ BadResponseException
constructor
A new instance of BadResponseException.
- #inspect ⇒ Object
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(response, path = nil) ⇒ BadResponseException
Returns a new instance of BadResponseException.
4 5 6 7 |
# File 'lib/embedly/exceptions.rb', line 4 def initialize(response, path = nil) @response ||= response @path ||= path end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
2 3 4 |
# File 'lib/embedly/exceptions.rb', line 2 def path @path end |
#response ⇒ Object
Returns the value of attribute response.
2 3 4 |
# File 'lib/embedly/exceptions.rb', line 2 def response @response end |
Instance Method Details
#inspect ⇒ Object
13 14 15 |
# File 'lib/embedly/exceptions.rb', line 13 def inspect self. end |
#message ⇒ Object
9 10 11 |
# File 'lib/embedly/exceptions.rb', line 9 def "Bad Response : #{@response.inspect} for path: #{@path.inspect}" end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/embedly/exceptions.rb', line 17 def to_s self. end |