mack-facets 0.6.0.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +4 -3
 - data/lib/{english_extensions → mack-facets/english_extensions}/inflect.rb +0 -0
 - data/lib/{english_extensions → mack-facets/english_extensions}/numerals.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/array.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/class.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/hash.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/kernel.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/math.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/module.rb +0 -0
 - data/lib/mack-facets/extensions/nil_class.rb +7 -0
 - data/lib/{extensions → mack-facets/extensions}/object.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/string.rb +0 -0
 - data/lib/{extensions → mack-facets/extensions}/symbol.rb +0 -0
 - data/lib/{utils → mack-facets/utils}/inflections.rb +0 -0
 - data/lib/{utils → mack-facets/utils}/inflector.rb +0 -0
 - data/lib/{utils → mack-facets/utils}/options_merger.rb +0 -0
 - data/lib/mack-facets/utils/registry_list.rb +83 -0
 - data/lib/mack-facets/utils/registry_map.rb +94 -0
 - data/lib/mack-facets.rb +11 -8
 - metadata +29 -48
 - data/doc/classes/Array.html +0 -408
 - data/doc/classes/Class.html +0 -233
 - data/doc/classes/Hash.html +0 -233
 - data/doc/classes/Kernel.html +0 -184
 - data/doc/classes/Mack/Utils/Inflector.html +0 -382
 - data/doc/classes/Math.html +0 -188
 - data/doc/classes/Module.html +0 -203
 - data/doc/classes/Object.html +0 -558
 - data/doc/classes/String.html +0 -451
 - data/doc/classes/Symbol.html +0 -148
 - data/doc/created.rid +0 -1
 - data/doc/files/README.html +0 -111
 - data/doc/files/lib/english_extensions/inflect_rb.html +0 -101
 - data/doc/files/lib/english_extensions/numerals_rb.html +0 -101
 - data/doc/files/lib/extensions/array_rb.html +0 -101
 - data/doc/files/lib/extensions/class_rb.html +0 -101
 - data/doc/files/lib/extensions/hash_rb.html +0 -108
 - data/doc/files/lib/extensions/kernel_rb.html +0 -109
 - data/doc/files/lib/extensions/math_rb.html +0 -101
 - data/doc/files/lib/extensions/module_rb.html +0 -101
 - data/doc/files/lib/extensions/object_rb.html +0 -101
 - data/doc/files/lib/extensions/string_rb.html +0 -101
 - data/doc/files/lib/extensions/symbol_rb.html +0 -101
 - data/doc/files/lib/mack-facets_rb.html +0 -120
 - data/doc/files/lib/utils/inflections_rb.html +0 -101
 - data/doc/files/lib/utils/inflector_rb.html +0 -108
 - data/doc/files/lib/utils/options_merger_rb.html +0 -101
 - data/doc/fr_class_index.html +0 -36
 - data/doc/fr_file_index.html +0 -42
 - data/doc/fr_method_index.html +0 -75
 - data/doc/index.html +0 -24
 - data/doc/rdoc-style.css +0 -208
 
| 
         @@ -1,382 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <?xml version="1.0" encoding="iso-8859-1"?>
         
     | 
| 
       2 
     | 
    
         
            -
            <!DOCTYPE html 
         
     | 
| 
       3 
     | 
    
         
            -
                 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         
     | 
| 
       4 
     | 
    
         
            -
                 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
         
     | 
| 
       7 
     | 
    
         
            -
            <head>
         
     | 
| 
       8 
     | 
    
         
            -
              <title>Class: Mack::Utils::Inflector</title>
         
     | 
| 
       9 
     | 
    
         
            -
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
         
     | 
| 
       10 
     | 
    
         
            -
              <meta http-equiv="Content-Script-Type" content="text/javascript" />
         
     | 
| 
       11 
     | 
    
         
            -
              <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
         
     | 
| 
       12 
     | 
    
         
            -
              <script type="text/javascript">
         
     | 
| 
       13 
     | 
    
         
            -
              // <![CDATA[
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
              function popupCode( url ) {
         
     | 
| 
       16 
     | 
    
         
            -
                window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
         
     | 
| 
       17 
     | 
    
         
            -
              }
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              function toggleCode( id ) {
         
     | 
| 
       20 
     | 
    
         
            -
                if ( document.getElementById )
         
     | 
| 
       21 
     | 
    
         
            -
                  elem = document.getElementById( id );
         
     | 
| 
       22 
     | 
    
         
            -
                else if ( document.all )
         
     | 
| 
       23 
     | 
    
         
            -
                  elem = eval( "document.all." + id );
         
     | 
| 
       24 
     | 
    
         
            -
                else
         
     | 
| 
       25 
     | 
    
         
            -
                  return false;
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                elemStyle = elem.style;
         
     | 
| 
       28 
     | 
    
         
            -
                
         
     | 
| 
       29 
     | 
    
         
            -
                if ( elemStyle.display != "block" ) {
         
     | 
| 
       30 
     | 
    
         
            -
                  elemStyle.display = "block"
         
     | 
| 
       31 
     | 
    
         
            -
                } else {
         
     | 
| 
       32 
     | 
    
         
            -
                  elemStyle.display = "none"
         
     | 
| 
       33 
     | 
    
         
            -
                }
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                return true;
         
     | 
| 
       36 
     | 
    
         
            -
              }
         
     | 
| 
       37 
     | 
    
         
            -
              
         
     | 
| 
       38 
     | 
    
         
            -
              // Make codeblocks hidden by default
         
     | 
| 
       39 
     | 
    
         
            -
              document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
         
     | 
| 
       40 
     | 
    
         
            -
              
         
     | 
| 
       41 
     | 
    
         
            -
              // ]]>
         
     | 
| 
       42 
     | 
    
         
            -
              </script>
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
            </head>
         
     | 
| 
       45 
     | 
    
         
            -
            <body>
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                <div id="classHeader">
         
     | 
| 
       50 
     | 
    
         
            -
                    <table class="header-table">
         
     | 
| 
       51 
     | 
    
         
            -
                    <tr class="top-aligned-row">
         
     | 
| 
       52 
     | 
    
         
            -
                      <td><strong>Class</strong></td>
         
     | 
| 
       53 
     | 
    
         
            -
                      <td class="class-name-in-header">Mack::Utils::Inflector</td>
         
     | 
| 
       54 
     | 
    
         
            -
                    </tr>
         
     | 
| 
       55 
     | 
    
         
            -
                    <tr class="top-aligned-row">
         
     | 
| 
       56 
     | 
    
         
            -
                        <td><strong>In:</strong></td>
         
     | 
| 
       57 
     | 
    
         
            -
                        <td>
         
     | 
| 
       58 
     | 
    
         
            -
                            <a href="../../../files/lib/utils/inflector_rb.html">
         
     | 
| 
       59 
     | 
    
         
            -
                            lib/utils/inflector.rb
         
     | 
| 
       60 
     | 
    
         
            -
                            </a>
         
     | 
| 
       61 
     | 
    
         
            -
                    <br />
         
     | 
| 
       62 
     | 
    
         
            -
                        </td>
         
     | 
| 
       63 
     | 
    
         
            -
                    </tr>
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                    <tr class="top-aligned-row">
         
     | 
| 
       66 
     | 
    
         
            -
                        <td><strong>Parent:</strong></td>
         
     | 
| 
       67 
     | 
    
         
            -
                        <td>
         
     | 
| 
       68 
     | 
    
         
            -
                            <a href="../../Object.html">
         
     | 
| 
       69 
     | 
    
         
            -
                            Object
         
     | 
| 
       70 
     | 
    
         
            -
                           </a>
         
     | 
| 
       71 
     | 
    
         
            -
                        </td>
         
     | 
| 
       72 
     | 
    
         
            -
                    </tr>
         
     | 
| 
       73 
     | 
    
         
            -
                    </table>
         
     | 
| 
       74 
     | 
    
         
            -
                </div>
         
     | 
| 
       75 
     | 
    
         
            -
              <!-- banner header -->
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
              <div id="bodyContent">
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
              <div id="contextContent">
         
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
                <div id="description">
         
     | 
| 
       84 
     | 
    
         
            -
                  <p>
         
     | 
| 
       85 
     | 
    
         
            -
            This class is used to deal with inflection strings. This means taken a
         
     | 
| 
       86 
     | 
    
         
            -
            string and make it <a href="Inflector.html#M000039">plural</a>, or <a
         
     | 
| 
       87 
     | 
    
         
            -
            href="Inflector.html#M000040">singular</a>, etc… Inflection rules can
         
     | 
| 
       88 
     | 
    
         
            -
            be added very easy, and are checked from the bottom up. This means that the
         
     | 
| 
       89 
     | 
    
         
            -
            last rule is the first rule to be matched. The exception to this, kind of,
         
     | 
| 
       90 
     | 
    
         
            -
            is ‘<a href="Inflector.html#M000041">irregular</a>’ and
         
     | 
| 
       91 
     | 
    
         
            -
            ‘uncountable’ rules. The ‘uncountable’ rules are
         
     | 
| 
       92 
     | 
    
         
            -
            always checked first, then the ‘<a
         
     | 
| 
       93 
     | 
    
         
            -
            href="Inflector.html#M000041">irregular</a>’ rules, and finally
         
     | 
| 
       94 
     | 
    
         
            -
            either the ‘<a href="Inflector.html#M000040">singular</a>’ or
         
     | 
| 
       95 
     | 
    
         
            -
            ‘<a href="Inflector.html#M000039">plural</a>’ rules, depending
         
     | 
| 
       96 
     | 
    
         
            -
            on what you‘re trying to do. Within each of these sets of rules, the
         
     | 
| 
       97 
     | 
    
         
            -
            last rule in is the first rule matched.
         
     | 
| 
       98 
     | 
    
         
            -
            </p>
         
     | 
| 
       99 
     | 
    
         
            -
            <p>
         
     | 
| 
       100 
     | 
    
         
            -
            Example:
         
     | 
| 
       101 
     | 
    
         
            -
            </p>
         
     | 
| 
       102 
     | 
    
         
            -
            <pre>
         
     | 
| 
       103 
     | 
    
         
            -
              Mack::Utils::Inflector.inflections do |inflect|
         
     | 
| 
       104 
     | 
    
         
            -
                inflect.plural(/$/, 's')
         
     | 
| 
       105 
     | 
    
         
            -
                inflect.plural(/^(ox)$/i, '\1en')
         
     | 
| 
       106 
     | 
    
         
            -
                inflect.plural(/(phenomen|criteri)on$/i, '\1a')
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                inflect.singular(/s$/i, '')
         
     | 
| 
       109 
     | 
    
         
            -
                inflect.singular(/(n)ews$/i, '\1ews')
         
     | 
| 
       110 
     | 
    
         
            -
                inflect.singular(/^(.*)ookies$/, '\1ookie')
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
                inflect.irregular('person', 'people')
         
     | 
| 
       113 
     | 
    
         
            -
                inflect.irregular('child', 'children')
         
     | 
| 
       114 
     | 
    
         
            -
              end
         
     | 
| 
       115 
     | 
    
         
            -
            </pre>
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
                </div>
         
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
               </div>
         
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
                <div id="method-list">
         
     | 
| 
       123 
     | 
    
         
            -
                  <h3 class="section-bar">Methods</h3>
         
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
                  <div class="name-list">
         
     | 
| 
       126 
     | 
    
         
            -
                  <a href="#M000044">inflections</a>  
         
     | 
| 
       127 
     | 
    
         
            -
                  <a href="#M000041">irregular</a>  
         
     | 
| 
       128 
     | 
    
         
            -
                  <a href="#M000039">plural</a>  
         
     | 
| 
       129 
     | 
    
         
            -
                  <a href="#M000043">pluralize</a>  
         
     | 
| 
       130 
     | 
    
         
            -
                  <a href="#M000040">singular</a>  
         
     | 
| 
       131 
     | 
    
         
            -
                  <a href="#M000042">singularize</a>  
         
     | 
| 
       132 
     | 
    
         
            -
                  </div>
         
     | 
| 
       133 
     | 
    
         
            -
                </div>
         
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
              </div>
         
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
                <!-- if includes -->
         
     | 
| 
       139 
     | 
    
         
            -
                <div id="includes">
         
     | 
| 
       140 
     | 
    
         
            -
                  <h3 class="section-bar">Included Modules</h3>
         
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
                  <div id="includes-list">
         
     | 
| 
       143 
     | 
    
         
            -
                    <span class="include-name">Singleton</span>
         
     | 
| 
       144 
     | 
    
         
            -
                  </div>
         
     | 
| 
       145 
     | 
    
         
            -
                </div>
         
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
                <div id="section">
         
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
                  
         
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
                <!-- if method_list -->
         
     | 
| 
       157 
     | 
    
         
            -
                <div id="methods">
         
     | 
| 
       158 
     | 
    
         
            -
                  <h3 class="section-bar">Public Class methods</h3>
         
     | 
| 
       159 
     | 
    
         
            -
             
     | 
| 
       160 
     | 
    
         
            -
                  <div id="method-M000044" class="method-detail">
         
     | 
| 
       161 
     | 
    
         
            -
                    <a name="M000044"></a>
         
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       164 
     | 
    
         
            -
                      <a href="#M000044" class="method-signature">
         
     | 
| 
       165 
     | 
    
         
            -
                      <span class="method-name">inflections</span><span class="method-args">() {|Mack::Utils::Inflector.instance| ...}</span>
         
     | 
| 
       166 
     | 
    
         
            -
                      </a>
         
     | 
| 
       167 
     | 
    
         
            -
                    </div>
         
     | 
| 
       168 
     | 
    
         
            -
                  
         
     | 
| 
       169 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       170 
     | 
    
         
            -
                      <p>
         
     | 
| 
       171 
     | 
    
         
            -
            Yields up Mack::Utils::Inflector.instance
         
     | 
| 
       172 
     | 
    
         
            -
            </p>
         
     | 
| 
       173 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       174 
     | 
    
         
            -
                        onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
         
     | 
| 
       175 
     | 
    
         
            -
                      <div class="method-source-code" id="M000044-source">
         
     | 
| 
       176 
     | 
    
         
            -
            <pre>
         
     | 
| 
       177 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/utils/inflector.rb, line 87</span>
         
     | 
| 
       178 
     | 
    
         
            -
            87:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inflections</span>
         
     | 
| 
       179 
     | 
    
         
            -
            88:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
         
     | 
| 
       180 
     | 
    
         
            -
            89:             <span class="ruby-keyword kw">yield</span> <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflector</span>.<span class="ruby-identifier">instance</span>
         
     | 
| 
       181 
     | 
    
         
            -
            90:           <span class="ruby-keyword kw">else</span>
         
     | 
| 
       182 
     | 
    
         
            -
            91:             <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflector</span>.<span class="ruby-identifier">instance</span>
         
     | 
| 
       183 
     | 
    
         
            -
            92:           <span class="ruby-keyword kw">end</span>
         
     | 
| 
       184 
     | 
    
         
            -
            93:         <span class="ruby-keyword kw">end</span>
         
     | 
| 
       185 
     | 
    
         
            -
            </pre>
         
     | 
| 
       186 
     | 
    
         
            -
                      </div>
         
     | 
| 
       187 
     | 
    
         
            -
                    </div>
         
     | 
| 
       188 
     | 
    
         
            -
                  </div>
         
     | 
| 
       189 
     | 
    
         
            -
             
     | 
| 
       190 
     | 
    
         
            -
                  <h3 class="section-bar">Public Instance methods</h3>
         
     | 
| 
       191 
     | 
    
         
            -
             
     | 
| 
       192 
     | 
    
         
            -
                  <div id="method-M000041" class="method-detail">
         
     | 
| 
       193 
     | 
    
         
            -
                    <a name="M000041"></a>
         
     | 
| 
       194 
     | 
    
         
            -
             
     | 
| 
       195 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       196 
     | 
    
         
            -
                      <a href="#M000041" class="method-signature">
         
     | 
| 
       197 
     | 
    
         
            -
                      <span class="method-name">irregular</span><span class="method-args">(rule, replacement)</span>
         
     | 
| 
       198 
     | 
    
         
            -
                      </a>
         
     | 
| 
       199 
     | 
    
         
            -
                    </div>
         
     | 
| 
       200 
     | 
    
         
            -
                  
         
     | 
| 
       201 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       202 
     | 
    
         
            -
                      <p>
         
     | 
| 
       203 
     | 
    
         
            -
            Adds a <a href="Inflector.html#M000041">irregular</a> rule to the system.
         
     | 
| 
       204 
     | 
    
         
            -
            </p>
         
     | 
| 
       205 
     | 
    
         
            -
            <p>
         
     | 
| 
       206 
     | 
    
         
            -
            Example:
         
     | 
| 
       207 
     | 
    
         
            -
            </p>
         
     | 
| 
       208 
     | 
    
         
            -
            <pre>
         
     | 
| 
       209 
     | 
    
         
            -
              Mack::Utils::Inflector.inflections do |inflect|
         
     | 
| 
       210 
     | 
    
         
            -
                inflect.irregular('person', 'people')
         
     | 
| 
       211 
     | 
    
         
            -
                inflect.irregular('child', 'children')
         
     | 
| 
       212 
     | 
    
         
            -
              end
         
     | 
| 
       213 
     | 
    
         
            -
            </pre>
         
     | 
| 
       214 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       215 
     | 
    
         
            -
                        onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
         
     | 
| 
       216 
     | 
    
         
            -
                      <div class="method-source-code" id="M000041-source">
         
     | 
| 
       217 
     | 
    
         
            -
            <pre>
         
     | 
| 
       218 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/utils/inflector.rb, line 58</span>
         
     | 
| 
       219 
     | 
    
         
            -
            58:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">irregular</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       220 
     | 
    
         
            -
            59:         <span class="ruby-constant">English</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflect</span>.<span class="ruby-identifier">rule</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       221 
     | 
    
         
            -
            60:         <span class="ruby-constant">English</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflect</span>.<span class="ruby-identifier">word</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       222 
     | 
    
         
            -
            61:       <span class="ruby-keyword kw">end</span>
         
     | 
| 
       223 
     | 
    
         
            -
            </pre>
         
     | 
| 
       224 
     | 
    
         
            -
                      </div>
         
     | 
| 
       225 
     | 
    
         
            -
                    </div>
         
     | 
| 
       226 
     | 
    
         
            -
                  </div>
         
     | 
| 
       227 
     | 
    
         
            -
             
     | 
| 
       228 
     | 
    
         
            -
                  <div id="method-M000039" class="method-detail">
         
     | 
| 
       229 
     | 
    
         
            -
                    <a name="M000039"></a>
         
     | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
       231 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       232 
     | 
    
         
            -
                      <a href="#M000039" class="method-signature">
         
     | 
| 
       233 
     | 
    
         
            -
                      <span class="method-name">plural</span><span class="method-args">(rule, replacement)</span>
         
     | 
| 
       234 
     | 
    
         
            -
                      </a>
         
     | 
| 
       235 
     | 
    
         
            -
                    </div>
         
     | 
| 
       236 
     | 
    
         
            -
                  
         
     | 
| 
       237 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       238 
     | 
    
         
            -
                      <p>
         
     | 
| 
       239 
     | 
    
         
            -
            Adds a <a href="Inflector.html#M000039">plural</a> rule to the system.
         
     | 
| 
       240 
     | 
    
         
            -
            </p>
         
     | 
| 
       241 
     | 
    
         
            -
            <p>
         
     | 
| 
       242 
     | 
    
         
            -
            Example:
         
     | 
| 
       243 
     | 
    
         
            -
            </p>
         
     | 
| 
       244 
     | 
    
         
            -
            <pre>
         
     | 
| 
       245 
     | 
    
         
            -
              Mack::Utils::Inflector.inflections do |inflect|
         
     | 
| 
       246 
     | 
    
         
            -
                inflect.plural(/$/, 's')
         
     | 
| 
       247 
     | 
    
         
            -
                inflect.plural(/^(ox)$/i, '\1en')
         
     | 
| 
       248 
     | 
    
         
            -
                inflect.plural(/(phenomen|criteri)on$/i, '\1a')
         
     | 
| 
       249 
     | 
    
         
            -
              end
         
     | 
| 
       250 
     | 
    
         
            -
            </pre>
         
     | 
| 
       251 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       252 
     | 
    
         
            -
                        onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
         
     | 
| 
       253 
     | 
    
         
            -
                      <div class="method-source-code" id="M000039-source">
         
     | 
| 
       254 
     | 
    
         
            -
            <pre>
         
     | 
| 
       255 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/utils/inflector.rb, line 35</span>
         
     | 
| 
       256 
     | 
    
         
            -
            35:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">plural</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       257 
     | 
    
         
            -
            36:         <span class="ruby-constant">English</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflect</span>.<span class="ruby-identifier">plural_rule</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       258 
     | 
    
         
            -
            37:       <span class="ruby-keyword kw">end</span>
         
     | 
| 
       259 
     | 
    
         
            -
            </pre>
         
     | 
| 
       260 
     | 
    
         
            -
                      </div>
         
     | 
| 
       261 
     | 
    
         
            -
                    </div>
         
     | 
| 
       262 
     | 
    
         
            -
                  </div>
         
     | 
| 
       263 
     | 
    
         
            -
             
     | 
| 
       264 
     | 
    
         
            -
                  <div id="method-M000043" class="method-detail">
         
     | 
| 
       265 
     | 
    
         
            -
                    <a name="M000043"></a>
         
     | 
| 
       266 
     | 
    
         
            -
             
     | 
| 
       267 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       268 
     | 
    
         
            -
                      <a href="#M000043" class="method-signature">
         
     | 
| 
       269 
     | 
    
         
            -
                      <span class="method-name">pluralize</span><span class="method-args">(word)</span>
         
     | 
| 
       270 
     | 
    
         
            -
                      </a>
         
     | 
| 
       271 
     | 
    
         
            -
                    </div>
         
     | 
| 
       272 
     | 
    
         
            -
                  
         
     | 
| 
       273 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       274 
     | 
    
         
            -
                      <p>
         
     | 
| 
       275 
     | 
    
         
            -
            Returns the <a href="Inflector.html#M000040">singular</a> version of the
         
     | 
| 
       276 
     | 
    
         
            -
            word, if possible.
         
     | 
| 
       277 
     | 
    
         
            -
            </p>
         
     | 
| 
       278 
     | 
    
         
            -
            <p>
         
     | 
| 
       279 
     | 
    
         
            -
            Examples:
         
     | 
| 
       280 
     | 
    
         
            -
            </p>
         
     | 
| 
       281 
     | 
    
         
            -
            <pre>
         
     | 
| 
       282 
     | 
    
         
            -
              Mack::Utils::Inflector.instance.pluralize("army") # => "armies"
         
     | 
| 
       283 
     | 
    
         
            -
              Mack::Utils::Inflector.instance.pluralize("person") # => "people"
         
     | 
| 
       284 
     | 
    
         
            -
              Mack::Utils::Inflector.instance.pluralize("boat") # => "boats"
         
     | 
| 
       285 
     | 
    
         
            -
            </pre>
         
     | 
| 
       286 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       287 
     | 
    
         
            -
                        onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
         
     | 
| 
       288 
     | 
    
         
            -
                      <div class="method-source-code" id="M000043-source">
         
     | 
| 
       289 
     | 
    
         
            -
            <pre>
         
     | 
| 
       290 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/utils/inflector.rb, line 79</span>
         
     | 
| 
       291 
     | 
    
         
            -
            79:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pluralize</span>(<span class="ruby-identifier">word</span>)
         
     | 
| 
       292 
     | 
    
         
            -
            80:         <span class="ruby-constant">English</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflect</span>.<span class="ruby-identifier">plural</span>(<span class="ruby-identifier">word</span>)
         
     | 
| 
       293 
     | 
    
         
            -
            81:       <span class="ruby-keyword kw">end</span>
         
     | 
| 
       294 
     | 
    
         
            -
            </pre>
         
     | 
| 
       295 
     | 
    
         
            -
                      </div>
         
     | 
| 
       296 
     | 
    
         
            -
                    </div>
         
     | 
| 
       297 
     | 
    
         
            -
                  </div>
         
     | 
| 
       298 
     | 
    
         
            -
             
     | 
| 
       299 
     | 
    
         
            -
                  <div id="method-M000040" class="method-detail">
         
     | 
| 
       300 
     | 
    
         
            -
                    <a name="M000040"></a>
         
     | 
| 
       301 
     | 
    
         
            -
             
     | 
| 
       302 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       303 
     | 
    
         
            -
                      <a href="#M000040" class="method-signature">
         
     | 
| 
       304 
     | 
    
         
            -
                      <span class="method-name">singular</span><span class="method-args">(rule, replacement)</span>
         
     | 
| 
       305 
     | 
    
         
            -
                      </a>
         
     | 
| 
       306 
     | 
    
         
            -
                    </div>
         
     | 
| 
       307 
     | 
    
         
            -
                  
         
     | 
| 
       308 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       309 
     | 
    
         
            -
                      <p>
         
     | 
| 
       310 
     | 
    
         
            -
            Adds a <a href="Inflector.html#M000040">singular</a> rule to the system.
         
     | 
| 
       311 
     | 
    
         
            -
            </p>
         
     | 
| 
       312 
     | 
    
         
            -
            <p>
         
     | 
| 
       313 
     | 
    
         
            -
            Example:
         
     | 
| 
       314 
     | 
    
         
            -
            </p>
         
     | 
| 
       315 
     | 
    
         
            -
            <pre>
         
     | 
| 
       316 
     | 
    
         
            -
              Mack::Utils::Inflector.inflections do |inflect|
         
     | 
| 
       317 
     | 
    
         
            -
                inflect.singular(/s$/i, '')
         
     | 
| 
       318 
     | 
    
         
            -
                inflect.singular(/(n)ews$/i, '\1ews')
         
     | 
| 
       319 
     | 
    
         
            -
                inflect.singular(/^(.*)ookies$/, '\1ookie')
         
     | 
| 
       320 
     | 
    
         
            -
              end
         
     | 
| 
       321 
     | 
    
         
            -
            </pre>
         
     | 
| 
       322 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       323 
     | 
    
         
            -
                        onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
         
     | 
| 
       324 
     | 
    
         
            -
                      <div class="method-source-code" id="M000040-source">
         
     | 
| 
       325 
     | 
    
         
            -
            <pre>
         
     | 
| 
       326 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/utils/inflector.rb, line 47</span>
         
     | 
| 
       327 
     | 
    
         
            -
            47:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">singular</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       328 
     | 
    
         
            -
            48:         <span class="ruby-constant">English</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflect</span>.<span class="ruby-identifier">singular_rule</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">replacement</span>)
         
     | 
| 
       329 
     | 
    
         
            -
            49:       <span class="ruby-keyword kw">end</span>
         
     | 
| 
       330 
     | 
    
         
            -
            </pre>
         
     | 
| 
       331 
     | 
    
         
            -
                      </div>
         
     | 
| 
       332 
     | 
    
         
            -
                    </div>
         
     | 
| 
       333 
     | 
    
         
            -
                  </div>
         
     | 
| 
       334 
     | 
    
         
            -
             
     | 
| 
       335 
     | 
    
         
            -
                  <div id="method-M000042" class="method-detail">
         
     | 
| 
       336 
     | 
    
         
            -
                    <a name="M000042"></a>
         
     | 
| 
       337 
     | 
    
         
            -
             
     | 
| 
       338 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       339 
     | 
    
         
            -
                      <a href="#M000042" class="method-signature">
         
     | 
| 
       340 
     | 
    
         
            -
                      <span class="method-name">singularize</span><span class="method-args">(word)</span>
         
     | 
| 
       341 
     | 
    
         
            -
                      </a>
         
     | 
| 
       342 
     | 
    
         
            -
                    </div>
         
     | 
| 
       343 
     | 
    
         
            -
                  
         
     | 
| 
       344 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       345 
     | 
    
         
            -
                      <p>
         
     | 
| 
       346 
     | 
    
         
            -
            Returns the <a href="Inflector.html#M000040">singular</a> version of the
         
     | 
| 
       347 
     | 
    
         
            -
            word, if possible.
         
     | 
| 
       348 
     | 
    
         
            -
            </p>
         
     | 
| 
       349 
     | 
    
         
            -
            <p>
         
     | 
| 
       350 
     | 
    
         
            -
            Examples:
         
     | 
| 
       351 
     | 
    
         
            -
            </p>
         
     | 
| 
       352 
     | 
    
         
            -
            <pre>
         
     | 
| 
       353 
     | 
    
         
            -
              Mack::Utils::Inflector.instance.singularize("armies") # => "army"
         
     | 
| 
       354 
     | 
    
         
            -
              Mack::Utils::Inflector.instance.singularize("people") # => "person"
         
     | 
| 
       355 
     | 
    
         
            -
              Mack::Utils::Inflector.instance.singularize("boats") # => "boat"
         
     | 
| 
       356 
     | 
    
         
            -
            </pre>
         
     | 
| 
       357 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       358 
     | 
    
         
            -
                        onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
         
     | 
| 
       359 
     | 
    
         
            -
                      <div class="method-source-code" id="M000042-source">
         
     | 
| 
       360 
     | 
    
         
            -
            <pre>
         
     | 
| 
       361 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/utils/inflector.rb, line 69</span>
         
     | 
| 
       362 
     | 
    
         
            -
            69:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">singularize</span>(<span class="ruby-identifier">word</span>)
         
     | 
| 
       363 
     | 
    
         
            -
            70:         <span class="ruby-constant">English</span><span class="ruby-operator">::</span><span class="ruby-constant">Inflect</span>.<span class="ruby-identifier">singular</span>(<span class="ruby-identifier">word</span>)
         
     | 
| 
       364 
     | 
    
         
            -
            71:       <span class="ruby-keyword kw">end</span>
         
     | 
| 
       365 
     | 
    
         
            -
            </pre>
         
     | 
| 
       366 
     | 
    
         
            -
                      </div>
         
     | 
| 
       367 
     | 
    
         
            -
                    </div>
         
     | 
| 
       368 
     | 
    
         
            -
                  </div>
         
     | 
| 
       369 
     | 
    
         
            -
             
     | 
| 
       370 
     | 
    
         
            -
             
     | 
| 
       371 
     | 
    
         
            -
                </div>
         
     | 
| 
       372 
     | 
    
         
            -
             
     | 
| 
       373 
     | 
    
         
            -
             
     | 
| 
       374 
     | 
    
         
            -
              </div>
         
     | 
| 
       375 
     | 
    
         
            -
             
     | 
| 
       376 
     | 
    
         
            -
             
     | 
| 
       377 
     | 
    
         
            -
            <div id="validator-badges">
         
     | 
| 
       378 
     | 
    
         
            -
              <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
         
     | 
| 
       379 
     | 
    
         
            -
            </div>
         
     | 
| 
       380 
     | 
    
         
            -
             
     | 
| 
       381 
     | 
    
         
            -
            </body>
         
     | 
| 
       382 
     | 
    
         
            -
            </html>
         
     | 
    
        data/doc/classes/Math.html
    DELETED
    
    | 
         @@ -1,188 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <?xml version="1.0" encoding="iso-8859-1"?>
         
     | 
| 
       2 
     | 
    
         
            -
            <!DOCTYPE html 
         
     | 
| 
       3 
     | 
    
         
            -
                 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         
     | 
| 
       4 
     | 
    
         
            -
                 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
         
     | 
| 
       7 
     | 
    
         
            -
            <head>
         
     | 
| 
       8 
     | 
    
         
            -
              <title>Module: Math</title>
         
     | 
| 
       9 
     | 
    
         
            -
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
         
     | 
| 
       10 
     | 
    
         
            -
              <meta http-equiv="Content-Script-Type" content="text/javascript" />
         
     | 
| 
       11 
     | 
    
         
            -
              <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
         
     | 
| 
       12 
     | 
    
         
            -
              <script type="text/javascript">
         
     | 
| 
       13 
     | 
    
         
            -
              // <![CDATA[
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
              function popupCode( url ) {
         
     | 
| 
       16 
     | 
    
         
            -
                window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
         
     | 
| 
       17 
     | 
    
         
            -
              }
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              function toggleCode( id ) {
         
     | 
| 
       20 
     | 
    
         
            -
                if ( document.getElementById )
         
     | 
| 
       21 
     | 
    
         
            -
                  elem = document.getElementById( id );
         
     | 
| 
       22 
     | 
    
         
            -
                else if ( document.all )
         
     | 
| 
       23 
     | 
    
         
            -
                  elem = eval( "document.all." + id );
         
     | 
| 
       24 
     | 
    
         
            -
                else
         
     | 
| 
       25 
     | 
    
         
            -
                  return false;
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                elemStyle = elem.style;
         
     | 
| 
       28 
     | 
    
         
            -
                
         
     | 
| 
       29 
     | 
    
         
            -
                if ( elemStyle.display != "block" ) {
         
     | 
| 
       30 
     | 
    
         
            -
                  elemStyle.display = "block"
         
     | 
| 
       31 
     | 
    
         
            -
                } else {
         
     | 
| 
       32 
     | 
    
         
            -
                  elemStyle.display = "none"
         
     | 
| 
       33 
     | 
    
         
            -
                }
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                return true;
         
     | 
| 
       36 
     | 
    
         
            -
              }
         
     | 
| 
       37 
     | 
    
         
            -
              
         
     | 
| 
       38 
     | 
    
         
            -
              // Make codeblocks hidden by default
         
     | 
| 
       39 
     | 
    
         
            -
              document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
         
     | 
| 
       40 
     | 
    
         
            -
              
         
     | 
| 
       41 
     | 
    
         
            -
              // ]]>
         
     | 
| 
       42 
     | 
    
         
            -
              </script>
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
            </head>
         
     | 
| 
       45 
     | 
    
         
            -
            <body>
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                <div id="classHeader">
         
     | 
| 
       50 
     | 
    
         
            -
                    <table class="header-table">
         
     | 
| 
       51 
     | 
    
         
            -
                    <tr class="top-aligned-row">
         
     | 
| 
       52 
     | 
    
         
            -
                      <td><strong>Module</strong></td>
         
     | 
| 
       53 
     | 
    
         
            -
                      <td class="class-name-in-header">Math</td>
         
     | 
| 
       54 
     | 
    
         
            -
                    </tr>
         
     | 
| 
       55 
     | 
    
         
            -
                    <tr class="top-aligned-row">
         
     | 
| 
       56 
     | 
    
         
            -
                        <td><strong>In:</strong></td>
         
     | 
| 
       57 
     | 
    
         
            -
                        <td>
         
     | 
| 
       58 
     | 
    
         
            -
                            <a href="../files/lib/extensions/math_rb.html">
         
     | 
| 
       59 
     | 
    
         
            -
                            lib/extensions/math.rb
         
     | 
| 
       60 
     | 
    
         
            -
                            </a>
         
     | 
| 
       61 
     | 
    
         
            -
                    <br />
         
     | 
| 
       62 
     | 
    
         
            -
                        </td>
         
     | 
| 
       63 
     | 
    
         
            -
                    </tr>
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                    </table>
         
     | 
| 
       66 
     | 
    
         
            -
                </div>
         
     | 
| 
       67 
     | 
    
         
            -
              <!-- banner header -->
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
              <div id="bodyContent">
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
              <div id="contextContent">
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
               </div>
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
                <div id="method-list">
         
     | 
| 
       80 
     | 
    
         
            -
                  <h3 class="section-bar">Methods</h3>
         
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
                  <div class="name-list">
         
     | 
| 
       83 
     | 
    
         
            -
                  <a href="#M000047">log2</a>  
         
     | 
| 
       84 
     | 
    
         
            -
                  <a href="#M000049">max</a>  
         
     | 
| 
       85 
     | 
    
         
            -
                  <a href="#M000048">min</a>  
         
     | 
| 
       86 
     | 
    
         
            -
                  </div>
         
     | 
| 
       87 
     | 
    
         
            -
                </div>
         
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
              </div>
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
                <!-- if includes -->
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                <div id="section">
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
                  
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
                <!-- if method_list -->
         
     | 
| 
       104 
     | 
    
         
            -
                <div id="methods">
         
     | 
| 
       105 
     | 
    
         
            -
                  <h3 class="section-bar">Public Class methods</h3>
         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
                  <div id="method-M000047" class="method-detail">
         
     | 
| 
       108 
     | 
    
         
            -
                    <a name="M000047"></a>
         
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       111 
     | 
    
         
            -
                      <a href="#M000047" class="method-signature">
         
     | 
| 
       112 
     | 
    
         
            -
                      <span class="method-name">log2</span><span class="method-args">(x)</span>
         
     | 
| 
       113 
     | 
    
         
            -
                      </a>
         
     | 
| 
       114 
     | 
    
         
            -
                    </div>
         
     | 
| 
       115 
     | 
    
         
            -
                  
         
     | 
| 
       116 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       117 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       118 
     | 
    
         
            -
                        onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
         
     | 
| 
       119 
     | 
    
         
            -
                      <div class="method-source-code" id="M000047-source">
         
     | 
| 
       120 
     | 
    
         
            -
            <pre>
         
     | 
| 
       121 
     | 
    
         
            -
               <span class="ruby-comment cmt"># File lib/extensions/math.rb, line 3</span>
         
     | 
| 
       122 
     | 
    
         
            -
            3:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log2</span>(<span class="ruby-identifier">x</span>)
         
     | 
| 
       123 
     | 
    
         
            -
            4:      <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">x</span>)<span class="ruby-operator">/</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log</span>(<span class="ruby-value">2.0</span>)
         
     | 
| 
       124 
     | 
    
         
            -
            5:   <span class="ruby-keyword kw">end</span>
         
     | 
| 
       125 
     | 
    
         
            -
            </pre>
         
     | 
| 
       126 
     | 
    
         
            -
                      </div>
         
     | 
| 
       127 
     | 
    
         
            -
                    </div>
         
     | 
| 
       128 
     | 
    
         
            -
                  </div>
         
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
                  <div id="method-M000049" class="method-detail">
         
     | 
| 
       131 
     | 
    
         
            -
                    <a name="M000049"></a>
         
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       134 
     | 
    
         
            -
                      <a href="#M000049" class="method-signature">
         
     | 
| 
       135 
     | 
    
         
            -
                      <span class="method-name">max</span><span class="method-args">(a, b)</span>
         
     | 
| 
       136 
     | 
    
         
            -
                      </a>
         
     | 
| 
       137 
     | 
    
         
            -
                    </div>
         
     | 
| 
       138 
     | 
    
         
            -
                  
         
     | 
| 
       139 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       140 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       141 
     | 
    
         
            -
                        onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
         
     | 
| 
       142 
     | 
    
         
            -
                      <div class="method-source-code" id="M000049-source">
         
     | 
| 
       143 
     | 
    
         
            -
            <pre>
         
     | 
| 
       144 
     | 
    
         
            -
                <span class="ruby-comment cmt"># File lib/extensions/math.rb, line 11</span>
         
     | 
| 
       145 
     | 
    
         
            -
            11:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">max</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
         
     | 
| 
       146 
     | 
    
         
            -
            12:      <span class="ruby-identifier">a</span> <span class="ruby-operator">></span> <span class="ruby-identifier">b</span> <span class="ruby-value">? </span><span class="ruby-identifier">a</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">b</span>
         
     | 
| 
       147 
     | 
    
         
            -
            13:   <span class="ruby-keyword kw">end</span>
         
     | 
| 
       148 
     | 
    
         
            -
            </pre>
         
     | 
| 
       149 
     | 
    
         
            -
                      </div>
         
     | 
| 
       150 
     | 
    
         
            -
                    </div>
         
     | 
| 
       151 
     | 
    
         
            -
                  </div>
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
                  <div id="method-M000048" class="method-detail">
         
     | 
| 
       154 
     | 
    
         
            -
                    <a name="M000048"></a>
         
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
                    <div class="method-heading">
         
     | 
| 
       157 
     | 
    
         
            -
                      <a href="#M000048" class="method-signature">
         
     | 
| 
       158 
     | 
    
         
            -
                      <span class="method-name">min</span><span class="method-args">(a, b)</span>
         
     | 
| 
       159 
     | 
    
         
            -
                      </a>
         
     | 
| 
       160 
     | 
    
         
            -
                    </div>
         
     | 
| 
       161 
     | 
    
         
            -
                  
         
     | 
| 
       162 
     | 
    
         
            -
                    <div class="method-description">
         
     | 
| 
       163 
     | 
    
         
            -
                      <p><a class="source-toggle" href="#"
         
     | 
| 
       164 
     | 
    
         
            -
                        onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
         
     | 
| 
       165 
     | 
    
         
            -
                      <div class="method-source-code" id="M000048-source">
         
     | 
| 
       166 
     | 
    
         
            -
            <pre>
         
     | 
| 
       167 
     | 
    
         
            -
               <span class="ruby-comment cmt"># File lib/extensions/math.rb, line 7</span>
         
     | 
| 
       168 
     | 
    
         
            -
            7:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">min</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
         
     | 
| 
       169 
     | 
    
         
            -
            8:      <span class="ruby-identifier">a</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">b</span> <span class="ruby-value">? </span><span class="ruby-identifier">a</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">b</span>
         
     | 
| 
       170 
     | 
    
         
            -
            9:   <span class="ruby-keyword kw">end</span>
         
     | 
| 
       171 
     | 
    
         
            -
            </pre>
         
     | 
| 
       172 
     | 
    
         
            -
                      </div>
         
     | 
| 
       173 
     | 
    
         
            -
                    </div>
         
     | 
| 
       174 
     | 
    
         
            -
                  </div>
         
     | 
| 
       175 
     | 
    
         
            -
             
     | 
| 
       176 
     | 
    
         
            -
             
     | 
| 
       177 
     | 
    
         
            -
                </div>
         
     | 
| 
       178 
     | 
    
         
            -
             
     | 
| 
       179 
     | 
    
         
            -
             
     | 
| 
       180 
     | 
    
         
            -
              </div>
         
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
            <div id="validator-badges">
         
     | 
| 
       184 
     | 
    
         
            -
              <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
         
     | 
| 
       185 
     | 
    
         
            -
            </div>
         
     | 
| 
       186 
     | 
    
         
            -
             
     | 
| 
       187 
     | 
    
         
            -
            </body>
         
     | 
| 
       188 
     | 
    
         
            -
            </html>
         
     |