Exception: RubyPsigate::ResponseError
- Inherits:
-
RubyPsigateError
- Object
- StandardError
- RubyPsigateError
- RubyPsigate::ResponseError
- Defined in:
- lib/ruby_psigate/error.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, message = nil) ⇒ ResponseError
Returns a new instance of ResponseError.
18 19 20 21 |
# File 'lib/ruby_psigate/error.rb', line 18 def initialize(response, = nil) @response = response @message = end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
16 17 18 |
# File 'lib/ruby_psigate/error.rb', line 16 def response @response end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/ruby_psigate/error.rb', line 23 def to_s "Failed with #{response.code} #{response. if response.respond_to?(:message)}" end |