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.
964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'lib/openid/server.rb', line 964 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 if headers @headers = headers else @headers = {} end @body = body end |
Instance Attribute Details
#body ⇒ Object
The body of this response.
962 963 964 |
# File 'lib/openid/server.rb', line 962 def body @body end |
#code ⇒ Object
The HTTP code of this response as an integer.
956 957 958 |
# File 'lib/openid/server.rb', line 956 def code @code end |
#headers ⇒ Object
#Hash of headers to include in this response.
959 960 961 |
# File 'lib/openid/server.rb', line 959 def headers @headers end |