Class: OpenID::Yadis::DiscoveryResult
- Inherits:
-
Object
- Object
- OpenID::Yadis::DiscoveryResult
- Defined in:
- lib/openid/yadis/discovery.rb
Overview
Contains the result of performing Yadis discovery on a URI
Instance Attribute Summary collapse
-
#content_type ⇒ Object
The content-type returned with the response_text.
-
#normalize_uri ⇒ Object
The result of following redirects from the request_uri.
-
#normalized_uri ⇒ Object
Returns the value of attribute normalized_uri.
-
#request_uri ⇒ Object
Returns the value of attribute request_uri.
-
#response_text ⇒ Object
The document returned from the xrds_uri.
-
#xrds_uri ⇒ Object
The URI from which the response text was returned (set to nil if there was no XRDS document found).
Instance Method Summary collapse
-
#initialize(request_uri) ⇒ DiscoveryResult
constructor
A new instance of DiscoveryResult.
-
#is_xrds ⇒ Object
Is the response text supposed to be an XRDS document?.
-
#used_yadis_location? ⇒ Boolean
Was the Yadis protocol’s indirection used?.
Constructor Details
#initialize(request_uri) ⇒ DiscoveryResult
Returns a new instance of DiscoveryResult.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/openid/yadis/discovery.rb', line 40 def initialize(request_uri) # Initialize the state of the object # # sets all attributes to None except the request_uri @request_uri = request_uri @normalized_uri = nil @xrds_uri = nil @content_type = nil @response_text = nil end |
Instance Attribute Details
#content_type ⇒ Object
The content-type returned with the response_text
33 34 35 |
# File 'lib/openid/yadis/discovery.rb', line 33 def content_type @content_type end |
#normalize_uri ⇒ Object
The result of following redirects from the request_uri
26 27 28 |
# File 'lib/openid/yadis/discovery.rb', line 26 def normalize_uri @normalize_uri end |
#normalized_uri ⇒ Object
Returns the value of attribute normalized_uri.
38 39 40 |
# File 'lib/openid/yadis/discovery.rb', line 38 def normalized_uri @normalized_uri end |
#request_uri ⇒ Object
Returns the value of attribute request_uri.
38 39 40 |
# File 'lib/openid/yadis/discovery.rb', line 38 def request_uri @request_uri end |
#response_text ⇒ Object
The document returned from the xrds_uri
36 37 38 |
# File 'lib/openid/yadis/discovery.rb', line 36 def response_text @response_text end |
#xrds_uri ⇒ Object
The URI from which the response text was returned (set to nil if there was no XRDS document found)
30 31 32 |
# File 'lib/openid/yadis/discovery.rb', line 30 def xrds_uri @xrds_uri end |
Instance Method Details
#is_xrds ⇒ Object
Is the response text supposed to be an XRDS document?
57 58 59 60 |
# File 'lib/openid/yadis/discovery.rb', line 57 def is_xrds return (used_yadis_location?() or @content_type == YADIS_CONTENT_TYPE) end |
#used_yadis_location? ⇒ Boolean
Was the Yadis protocol’s indirection used?
52 53 54 |
# File 'lib/openid/yadis/discovery.rb', line 52 def used_yadis_location? return @normalized_uri != @xrds_uri end |