Exception: CookieHTTPClient::HTTPFound

Inherits:
Exception
  • Object
show all
Defined in:
lib/cookie_http_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_uriObject (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

#sourceObject (readonly)

Returns the value of attribute source.



11
12
13
# File 'lib/cookie_http_client.rb', line 11

def source
  @source
end