Class: OpenID::Server::WebResponse
- Inherits:
-
Object
- Object
- OpenID::Server::WebResponse
- Defined in:
- lib/openid/server.rb
Overview
I am a response to an OpenID request in terms a web server understands.
I generally come from an #Encoder, either directly or from #Server.encodeResponse.
Instance Attribute Summary collapse
-
#body ⇒ Object
The body of this response.
-
#code ⇒ Object
The HTTP code of this response as an integer.
-
#headers ⇒ Object
#Hash of headers to include in this response.
Instance Method Summary collapse
-
#initialize(code = HTTP_OK, headers = nil, body = "") ⇒ WebResponse
constructor
A new instance of WebResponse.
Constructor Details
#initialize(code = HTTP_OK, headers = nil, body = "") ⇒ WebResponse
Returns a new instance of WebResponse.
981 982 983 984 985 986 987 988 989 990 |
# File 'lib/openid/server.rb', line 981 def initialize(code = HTTP_OK, headers = nil, body = "") # Construct me. # # These parameters are assigned directly as class attributes, # see my class documentation for their # descriptions. @code = code @headers = headers || {} @body = body end |
Instance Attribute Details
#body ⇒ Object
The body of this response.
979 980 981 |
# File 'lib/openid/server.rb', line 979 def body @body end |
#code ⇒ Object
The HTTP code of this response as an integer.
973 974 975 |
# File 'lib/openid/server.rb', line 973 def code @code end |
#headers ⇒ Object
#Hash of headers to include in this response.
976 977 978 |
# File 'lib/openid/server.rb', line 976 def headers @headers end |