Class: Keycardai::OAuth::HTTP::Response
- Inherits:
-
Data
- Object
- Data
- Keycardai::OAuth::HTTP::Response
- Defined in:
- lib/keycardai/oauth/http.rb
Overview
A minimal HTTP response: numeric status, header hash, body string.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#success? ⇒ Boolean
Whether the status is 2xx.
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body
15 16 17 |
# File 'lib/keycardai/oauth/http.rb', line 15 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers
15 16 17 |
# File 'lib/keycardai/oauth/http.rb', line 15 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status
15 16 17 |
# File 'lib/keycardai/oauth/http.rb', line 15 def status @status end |
Instance Method Details
#success? ⇒ Boolean
Returns whether the status is 2xx.
17 18 19 |
# File 'lib/keycardai/oauth/http.rb', line 17 def success? (200..299).cover?(status) end |