Class: OpenID::Server::WebResponse

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#bodyObject

The body of this response.



979
980
981
# File 'lib/openid/server.rb', line 979

def body
  @body
end

#codeObject

The HTTP code of this response as an integer.



973
974
975
# File 'lib/openid/server.rb', line 973

def code
  @code
end

#headersObject

#Hash of headers to include in this response.



976
977
978
# File 'lib/openid/server.rb', line 976

def headers
  @headers
end