Class: RestMan::Request::Init::CookieJar

Inherits:
ActiveMethod::Base
  • Object
show all
Defined in:
lib/restman/request/init/cookie_jar.rb

Overview

:include: _doc/lib/restman/request/init/cookie_jar.rdoc

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/restman/request/init/cookie_jar.rb', line 11

def call
  duplicated_cookies_check
  return cookies.dup if cookies.is_a?(HTTP::CookieJar)

  cookies.each do |key, value|
    cookie_jar.add cookie(key, value)
  end

  cookie_jar
end