Sha256: 2de57dc1dd564fce722c61881e5cb06deb211cd374b83c659b5302e683f6cd85
Contents?: true
Size: 1.88 KB
Versions: 1
Compression:
Stored size: 1.88 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>load_mime_map (Mongrel::Configurator)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 232</span> 232: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_mime_map</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">mime</span>={}) 233: <span class="ruby-comment cmt"># configure any requested mime map</span> 234: <span class="ruby-identifier">mime</span> = <span class="ruby-identifier">load_yaml</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">mime</span>) 235: 236: <span class="ruby-comment cmt"># check all the mime types to make sure they are the right format</span> 237: <span class="ruby-identifier">mime</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">log</span> <span class="ruby-node">"WARNING: MIME type #{k} must start with '.'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"."</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> } 238: 239: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">mime</span> 240: <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongrel-0.3.13.4 | doc/rdoc/classes/Mongrel/Configurator.src/M000102.html |