require "cgi" require "template" class Feeder def self.get(tmpl_path, options = {}) cgi = CGI.new mime_type = options[:mime_type] || "application/xml" encoding = options[:encoding] || "utf-8" language = options[:language] || "ja" v = Template.get(tmpl_path, {"type" => mime_type, "charset" => encoding}) v.encoding = encoding v.language = language v.site_url = "http://" + cgi.server_name v.feed_url