Exception: ResoWebApi::NetworkError
- Defined in:
- lib/reso_web_api/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NetworkError
constructor
A new instance of NetworkError.
- #status ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ NetworkError
Returns a new instance of NetworkError.
7 8 9 10 11 12 |
# File 'lib/reso_web_api/errors.rb', line 7 def initialize( = {}) # Support the standard initializer for errors opts = .is_a?(Hash) ? : { message: .to_s } @response = opts[:response] super(opts[:message]) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/reso_web_api/errors.rb', line 5 def response @response end |
Instance Method Details
#status ⇒ Object
14 15 16 |
# File 'lib/reso_web_api/errors.rb', line 14 def status response && response.status end |