Class: OIDC::Response
- Inherits:
-
Object
- Object
- OIDC::Response
- Defined in:
- lib/oidc/response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(resp) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean (also: #cache?)
Constructor Details
#initialize(resp) ⇒ Response
Returns a new instance of Response.
7 8 9 10 |
# File 'lib/oidc/response.rb', line 7 def initialize(resp) @status = resp.status @body = resp.body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/oidc/response.rb', line 5 def body @body end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/oidc/response.rb', line 5 def status @status end |
Instance Method Details
#success? ⇒ Boolean Also known as: cache?
12 13 14 |
# File 'lib/oidc/response.rb', line 12 def success? status == 200 || status == 204 end |