Module: Xunlei::Helper::CookieHelper

Included in:
Engine
Defined in:
lib/xunlei/helpers/cookie_helper.rb

Instance Method Summary collapse

Instance Method Details



4
5
6
7
# File 'lib/xunlei/helpers/cookie_helper.rb', line 4

def format_cookie(cookie)
  expires = cookie[:expires] ? cookie[:expires].strftime("%s") : "0"
  "#{cookie[:domain]}\tTRUE\t#{cookie[:path]}\tFALSE\t#{expires}\t#{cookie[:name]}\t#{cookie[:value]}\n"
end