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.
59 60 61 |
# File 'lib/webclient/webclient.rb', line 59 def initialize( response ) @response = response end |
Instance Method Details
#code ⇒ Object
62 |
# File 'lib/webclient/webclient.rb', line 62 def code() @response.code.to_i; end |
#message ⇒ Object
65 |
# File 'lib/webclient/webclient.rb', line 65 def () @response.; end |
#nok? ⇒ Boolean
64 |
# File 'lib/webclient/webclient.rb', line 64 def nok?() code != 200; end |
#ok? ⇒ Boolean
63 |
# File 'lib/webclient/webclient.rb', line 63 def ok?() code == 200; end |