Sha256: 2737f5215a73bc056eb1ceaa61cbfb386ed5ab68573259e237a54256d217ed28

Contents?: true

Size: 1.73 KB

Versions: 3

Compression:

Stored size: 1.73 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>type_for (MIME::Types)</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/mime/types.rb, line 587</span>
587:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type_for</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">platform</span> = <span class="ruby-keyword kw">false</span>)
588:       <span class="ruby-identifier">ext</span> = <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/.*\./o</span>, <span class="ruby-value str">''</span>)
589:       <span class="ruby-identifier">list</span> = <span class="ruby-ivar">@extension_index</span>[<span class="ruby-identifier">ext</span>]
590:       <span class="ruby-identifier">list</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">platform?</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">platform</span>
591:       <span class="ruby-identifier">list</span>
592:     <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
IOWA-1.0.3 external/mime-types/doc/classes/MIME/Types.src/M000003.html
IOWA-1.0.2 external/mime-types/doc/classes/MIME/Types.src/M000003.html
IOWA-1.0.0 external/mime-types/doc/classes/MIME/Types.src/M000003.html