Exception: CookieHTTPClient::HTTPFound
- Inherits:
-
Exception
- Object
- Exception
- CookieHTTPClient::HTTPFound
- Defined in:
- lib/cookie_http_client.rb
Instance Attribute Summary collapse
-
#redirect_uri ⇒ Object
readonly
Returns the value of attribute redirect_uri.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(httpFound, uri) ⇒ HTTPFound
constructor
A new instance of HTTPFound.
Constructor Details
#initialize(httpFound, uri) ⇒ HTTPFound
Returns a new instance of HTTPFound.
12 13 14 15 16 17 18 19 |
# File 'lib/cookie_http_client.rb', line 12 def initialize(httpFound, uri) @source = httpFound r = URI.parse(httpFound['location']) r.path = '/' if r.path.empty? r.scheme = uri.scheme unless r.scheme r.host = uri.host unless r.host @redirect_uri = URI.parse(r.to_s) end |
Instance Attribute Details
#redirect_uri ⇒ Object (readonly)
Returns the value of attribute redirect_uri.
11 12 13 |
# File 'lib/cookie_http_client.rb', line 11 def redirect_uri @redirect_uri end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
11 12 13 |
# File 'lib/cookie_http_client.rb', line 11 def source @source end |