# File lib/mechanize/cookie_jar.rb, line 68
    def save_as(file, format = :yaml)
      ::File.open(file, "w") { |f|
        case format
        when :yaml then
          YAML::dump(@jar, f)
        when :cookiestxt then
          dump_cookiestxt(f)
        else
          raise "Unknown cookie jar file format"
        end
      }
    end