def cookie(name, *value)
      name = name.to_s
      if value.empty?
        request.cookies[name]
      else
        value = Hash === value[0] ? value[0] : {value: value}
        if value[:value].nil?
          response.delete_cookie(name, value)
        else
          response.set_cookie(name, value)
        end
      end
    end
def cookie(name, *value)
      name = name.to_s
      if value.empty?
        request.cookies[name]
      else
        value = Hash === value[0] ? value[0] : {value: value}
        if value[:value].nil?
          response.delete_cookie(name, value)
        else
          response.set_cookie(name, value)
        end
      end
    end
Serves as a thin layer of convenience to Rack's built-in method: Request#cookies, Response#set_cookie, and
 Response#delete_cookie.

 If only one argument is given, the specified cookie is retreived and returned.
 If both arguments are supplied, the cookie is either set or deleted, depending on whether the second argument is
 nil, or otherwise is a hash containing the key/value pair ``:value => nil``.
 If you wish to set a cookie to an empty value without deleting it, you pass an empty string as the value