Class: RestMan::Request::MakeCookieHeader

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

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
# File 'lib/restman/request/make_cookie_header.rb', line 5

def call
  return nil if request.cookie_jar.nil?

  arr = request.cookie_jar.cookies(request.url)
  return nil if arr.empty?

  return HTTP::Cookie.cookie_value(arr)
end