def []=(name, value, options = {})
    string = value.is_a?(String) ? value : JSON.dump(value)
    encoded_value = encode(name, string, @options.merge(options))
    `#@document.cookie = #{encoded_value}`
  end
def []=(name, value, options = {})
    string = value.is_a?(String) ? value : JSON.dump(value)
    encoded_value = encode(name, string, @options.merge(options))
    `#@document.cookie = #{encoded_value}`
  end
Set a cookie.

 @param name [String] the name of the cookie
 @param value [Object] the data to set
 @param options [Hash] the options for the cookie

 @option options [Integer] :max_age the max age of the cookie in seconds
 @option options [Time]    :expires the expire date
 @option options [String]  :path    the path the cookie is valid on
 @option options [String]  :domain  the domain the cookie is valid on
 @option options [Boolean] :secure  whether the cookie is secure or not