Class: HTTP::Cookies

Inherits:
Object show all
Defined in:
lib/http_client/jruby/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(cookies) ⇒ Cookies

Returns a new instance of Cookies.



57
58
59
# File 'lib/http_client/jruby/response.rb', line 57

def initialize(cookies)
  @cookies = cookies
end

Instance Method Details

#[](cookie_name) ⇒ Object



61
62
63
# File 'lib/http_client/jruby/response.rb', line 61

def [](cookie_name)
  @cookies.find {|cookie| cookie.name == cookie_name }.value
end