Class: Webclient::Response::Status
- Inherits:
-
Object
- Object
- Webclient::Response::Status
- Defined in:
- lib/webclient/webclient.rb
Overview
nested (nested) class
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(response) ⇒ Status
constructor
A new instance of Status.
- #message ⇒ Object
- #nok? ⇒ Boolean
- #ok? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ Status
Returns a new instance of Status.
91 92 93 |
# File 'lib/webclient/webclient.rb', line 91 def initialize( response ) @response = response end |
Instance Method Details
#code ⇒ Object
94 |
# File 'lib/webclient/webclient.rb', line 94 def code() @response.code.to_i; end |
#message ⇒ Object
97 |
# File 'lib/webclient/webclient.rb', line 97 def () @response.; end |
#nok? ⇒ Boolean
96 |
# File 'lib/webclient/webclient.rb', line 96 def nok?() code != 200; end |
#ok? ⇒ Boolean
95 |
# File 'lib/webclient/webclient.rb', line 95 def ok?() code == 200; end |