class RDoc::Servlet

def asset generator_name, req, res

def asset generator_name, req, res
  asset_dir = @asset_dirs[generator_name]
  asset_path = File.join asset_dir, req.path
  if_modified_since req, res, asset_path
  res.body = File.read asset_path
  res.content_type = case req.path
                     when /\.css\z/ then 'text/css'
                     when /\.js\z/  then 'application/javascript'
                     else                'application/octet-stream'
                     end
end