ShogunPanda/lazier

View on GitHub
docs/Lazier.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Module: Lazier
  
    &mdash; Documentation by YARD 0.9.5
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  pathId = "Lazier";
  relpath = '';
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="class_list.html"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="_index.html">Index (L)</a> &raquo;
    
    
    <span class="title">Lazier</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <iframe id="search_frame" src="class_list.html"></iframe>

      <div id="content"><h1>Module: Lazier
  
  
  
</h1>
<div class="box_info">
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/lazier.rb<span class="defines">,<br />
  lib/lazier/hash.rb,<br /> lib/lazier/math.rb,<br /> lib/lazier/i18n.rb,<br /> lib/lazier/object.rb,<br /> lib/lazier/string.rb,<br /> lib/lazier/version.rb,<br /> lib/lazier/boolean.rb,<br /> lib/lazier/pathname.rb,<br /> lib/lazier/settings.rb,<br /> lib/lazier/datetime.rb,<br /> lib/lazier/timezone.rb,<br /> lib/lazier/exceptions.rb,<br /> lib/lazier/configuration.rb</span>
</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>This file is part of the lazier gem. Copyright (C) 2013 and above Shogun <a href="mailto:shogun@cowtech.it">shogun@cowtech.it</a>.
Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.</p>


  </div>
</div>
<div class="tags">
  

</div><h2>Defined Under Namespace</h2>
<p class="children">
  
    
      <strong class="modules">Modules:</strong> <span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span>, <span class='object_link'><a href="Lazier/DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span>, <span class='object_link'><a href="Lazier/Exceptions.html" title="Lazier::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span>, <span class='object_link'><a href="Lazier/Math.html" title="Lazier::Math (module)">Math</a></span>, <span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span>, <span class='object_link'><a href="Lazier/Pathname.html" title="Lazier::Pathname (module)">Pathname</a></span>, <span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span>, <span class='object_link'><a href="Lazier/TimeZone.html" title="Lazier::TimeZone (module)">TimeZone</a></span>, <span class='object_link'><a href="Lazier/Version.html" title="Lazier::Version (module)">Version</a></span>
    
  
    
      <strong class="classes">Classes:</strong> <span class='object_link'><a href="Lazier/Configuration.html" title="Lazier::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="Lazier/I18n.html" title="Lazier::I18n (class)">I18n</a></span>, <span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span>
    
  
</p>

  <h2>Constant Summary</h2>
  <dl class="constants">
    
      <dt id="ROOT-constant" class="">ROOT =
        <div class="docstring">
  <div class="discussion">
    <p>The root directory of the library</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='id identifier rubyid___dir__'>__dir__</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></pre></dd>
    
  </dl>







  
    <h2>
      Class Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#benchmark-class_method" title="benchmark (class method)">.<strong>benchmark</strong>(message: nil, precision: 0, &amp;block)  &#x21d2; Float|String </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Measure the time in milliseconds required to execute the given block.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#clean_hash_compact-class_method" title="clean_hash_compact (class method)">.<strong>clean_hash_compact</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>:nodoc:.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#find_class-class_method" title="find_class (class method)">.<strong>find_class</strong>(cls, scope = &quot;::@&quot;, only_in_scope = false)  &#x21d2; Class </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Finds a class to instantiate.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load%21-class_method" title="load! (class method)">.<strong>load!</strong>(*what)  &#x21d2; Settings </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads the extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_boolean-class_method" title="load_boolean (class method)">.<strong>load_boolean</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>Boolean</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_datetime-class_method" title="load_datetime (class method)">.<strong>load_datetime</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>DateTime</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_hash-class_method" title="load_hash (class method)">.<strong>load_hash</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>Hash</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_math-class_method" title="load_math (class method)">.<strong>load_math</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>Math</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_object-class_method" title="load_object (class method)">.<strong>load_object</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>Object</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_pathname-class_method" title="load_pathname (class method)">.<strong>load_pathname</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>Pathname</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#load_string-class_method" title="load_string (class method)">.<strong>load_string</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Loads <code>String</code> extensions.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#loaded_modules-class_method" title="loaded_modules (class method)">.<strong>loaded_modules</strong>  &#x21d2; Array </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the list of loaded Lazier modules.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#modules_loaded%3F-class_method" title="modules_loaded? (class method)">.<strong>modules_loaded?</strong>(*modules)  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Checks if <em>all</em> of the specified modules have been loaded.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#perform_load-class_method" title="perform_load (class method)">.<strong>perform_load</strong>(mod, target = nil, extension = nil, &amp;block)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>:nodoc:.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#platform-class_method" title="platform (class method)">.<strong>platform</strong>(force = false)  &#x21d2; Boolean, Symbol </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns which platform are we running on.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#search_class-class_method" title="search_class (class method)">.<strong>search_class</strong>(cls, scope = nil)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>:nodoc:.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#settings-class_method" title="settings (class method)">.<strong>settings</strong>  &#x21d2; Settings </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the settings for the extensions.</p>
</div></span>
  
</li>

      
    </ul>
  



  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="benchmark-class_method">
  
    .<strong>benchmark</strong>(message: nil, precision: 0, &amp;block)  &#x21d2; <tt>Float|<span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Measure the time in milliseconds required to execute the given block.</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>An optional message (see return value).</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>precision</span>
      
      
        <span class='type'>(<tt>Fixnum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The precision for the message (see return value).</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>block</span>
      
      
        <span class='type'>(<tt>Proc</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The block to evaluate.</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Float|<span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If a <code>message</code> is provided, then the message itself plus the duration under parenthesis will be returned,
otherwise the duration alone as a number.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


161
162
163
164</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 161</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_benchmark'>benchmark</span><span class='lparen'>(</span><span class='label'>message:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>precision:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='const'>Benchmark</span><span class='period'>.</span><span class='id identifier rubyid_ms'>ms</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_message'>message</span> <span class='op'>?</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%s (%0.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_precision'>precision</span><span class='embexpr_end'>}</span><span class='tstring_content'>f ms)</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="clean_hash_compact-class_method">
  
    .<strong>clean_hash_compact</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>:nodoc:</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


183
184
185
186
187
188</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 183</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clean_hash_compact'>clean_hash_compact</span>
  <span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_remove_method'>remove_method</span><span class='lparen'>(</span><span class='symbol'>:compact</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:compact</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_remove_method'>remove_method</span><span class='lparen'>(</span><span class='symbol'>:compact!</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:compact!</span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="find_class-class_method">
  
    .<strong>find_class</strong>(cls, scope = &quot;::@&quot;, only_in_scope = false)  &#x21d2; <tt>Class</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Finds a class to instantiate.</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>cls</span>
      
      
        <span class='type'>(<tt>Symbol|<span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span>|<span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If a <code>String</code> or a <code>Symbol</code> or a <code>Class</code>, then it will be the class to instantiate.
Otherwise the class of the object will returned.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>scope</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
      
      
        <em class="default">(defaults to: <tt>&quot;::@&quot;</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>The scope where to find the class. <code>%CLASS%</code>, <code>%</code>, <code>$</code>, <code>?</code> and <code>@</code> will be substituted with the class name.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>only_in_scope</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
      
      
        <em class="default">(defaults to: <tt>false</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>If only search inside the scope.</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Class</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The found class.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


144
145
146
147
148
149
150
151
152</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 144</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='comma'>,</span> <span class='id identifier rubyid_scope'>scope</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>::@</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_only_in_scope'>only_in_scope</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='lbracket'>[</span><span class='op'>::</span><span class='const'>String</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Symbol</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_cls'>cls</span> <span class='op'>=</span> <span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span>
    <span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^::</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_scope'>scope</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_only_in_scope'>only_in_scope</span>
    <span class='id identifier rubyid_search_class'>search_class</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='comma'>,</span> <span class='id identifier rubyid_scope'>scope</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'>NameError</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_cls'>cls</span><span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Class</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_cls'>cls</span> <span class='op'>:</span> <span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load!-class_method">
  
    .<strong>load!</strong>(*what)  &#x21d2; <tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads the extensions.</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>what</span>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The modules to load. Valid values are:</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>object</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>boolean</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>string</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>hash</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>hash_method_access</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>datetime</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>math</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>pathname</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a customizable set of options</p>
</div>
      
    </li>
  
</ul>

  
    
    

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The settings for the extensions.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


57
58
59
60
61
62
63
64</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 57</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load!'>load!</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_what'>what</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_valid_modules'>valid_modules</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:object</span><span class='comma'>,</span> <span class='symbol'>:boolean</span><span class='comma'>,</span> <span class='symbol'>:string</span><span class='comma'>,</span> <span class='symbol'>:hash</span><span class='comma'>,</span> <span class='symbol'>:datetime</span><span class='comma'>,</span> <span class='symbol'>:math</span><span class='comma'>,</span> <span class='symbol'>:pathname</span><span class='rbracket'>]</span>
  <span class='id identifier rubyid_modules'>modules</span> <span class='op'>=</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>?</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_valid_modules'>valid_modules</span>
  <span class='lparen'>(</span><span class='id identifier rubyid_modules'>modules</span> <span class='op'>&amp;</span> <span class='id identifier rubyid_valid_modules'>valid_modules</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_w'>w</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>load_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_w'>w</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>

  <span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
  <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_boolean-class_method">
  
    .<strong>load_boolean</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>Boolean</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


73
74
75
76
77
78
79
80
81
82</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 73</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_boolean'>load_boolean</span>
  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:boolean</span><span class='rparen'>)</span> <span class='kw'>do</span>
    <span class='lbracket'>[</span><span class='op'>::</span><span class='const'>TrueClass</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>FalseClass</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_klass'>klass</span><span class='op'>|</span>
      <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
        <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span>
        <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Boolean</span>
      <span class='kw'>end</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_datetime-class_method">
  
    .<strong>load_datetime</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>DateTime</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


100
101
102
103
104
105
106
107
108
109
110</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 100</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_datetime'>load_datetime</span>
  <span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>

  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:datetime</span><span class='rparen'>)</span> <span class='kw'>do</span>
    <span class='lbracket'>[</span><span class='op'>::</span><span class='const'>Time</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Date</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>DateTime</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span>
      <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>DateTime</span> <span class='rbrace'>}</span>
    <span class='kw'>end</span>

    <span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>TimeZone</span> <span class='rbrace'>}</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_hash-class_method">
  
    .<strong>load_hash</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>Hash</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


90
91
92
93
94
95
96
97</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 90</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_hash'>load_hash</span>
  <span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>

  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:hash</span><span class='rparen'>)</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_clean_hash_compact'>clean_hash_compact</span>
    <span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Hash</span> <span class='rbrace'>}</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_math-class_method">
  
    .<strong>load_math</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>Math</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


113
114
115
116</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 113</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_math'>load_math</span>
  <span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:math</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Math</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Math</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_object-class_method">
  
    .<strong>load_object</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>Object</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


67
68
69
70</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 67</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
  <span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_boolean'>load_boolean</span>
  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:object</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Object</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_pathname-class_method">
  
    .<strong>load_pathname</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>Pathname</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


119
120
121</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 119</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_pathname'>load_pathname</span>
  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:pathname</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Pathname</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Pathname</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="load_string-class_method">
  
    .<strong>load_string</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Loads <code>String</code> extensions.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


85
86
87</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 85</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_string'>load_string</span>
  <span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='symbol'>:string</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>String</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>String</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="loaded_modules-class_method">
  
    .<strong>loaded_modules</strong>  &#x21d2; <tt>Array</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the list of loaded Lazier modules.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The list of loaded Lazier modules.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


126
127
128</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 126</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_loaded_modules'>loaded_modules</span>
  <span class='ivar'>@loaded</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="modules_loaded?-class_method">
  
    .<strong>modules_loaded?</strong>(*modules)  &#x21d2; <tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Checks if <em>all</em> of the specified modules have been loaded.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><code>true</code> if the <em>all</em> of the specified modules has already been loaded, <code>false</code> otherwise.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


133
134
135</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 133</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_modules_loaded?'>modules_loaded?</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_modules'>modules</span><span class='rparen'>)</span>
  <span class='lparen'>(</span><span class='id identifier rubyid_modules'>modules</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span> <span class='op'>-</span> <span class='ivar'>@loaded</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="perform_load-class_method">
  
    .<strong>perform_load</strong>(mod, target = nil, extension = nil, &amp;block)  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>:nodoc:</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


199
200
201
202
203
204
205
206</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 199</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_perform_load'>perform_load</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_extension'>extension</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
  <span class='ivar'>@loaded</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>

  <span class='kw'>unless</span> <span class='ivar'>@loaded</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>?</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='op'>:</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_include'>include</span> <span class='id identifier rubyid_extension'>extension</span> <span class='rbrace'>}</span>
    <span class='ivar'>@loaded</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_mod'>mod</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="platform-class_method">
  
    .<strong>platform</strong>(force = false)  &#x21d2; <tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>, <tt>Symbol</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns which platform are we running on. Can be <code>:java</code>, <code>:osx</code>, <code>:posix</code> or <code>:win32</code></p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If force detection again.</p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The current platform.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


170
171
172
173
174
175
176
177
178
179
180</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 170</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_platform'>platform</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
  <span class='ivar'>@platform</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>

  <span class='ivar'>@platform</span> <span class='op'>||=</span>
    <span class='kw'>case</span> <span class='const'>RUBY_PLATFORM</span>
    <span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>cygwin|mingw|win32</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span> <span class='symbol'>:win32</span>
    <span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>java</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span> <span class='symbol'>:java</span>
    <span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>darwin</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span> <span class='symbol'>:osx</span>
    <span class='kw'>else</span> <span class='symbol'>:posix</span>
    <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="search_class-class_method">
  
    .<strong>search_class</strong>(cls, scope = nil)  &#x21d2; <tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>:nodoc:</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


191
192
193
194
195
196</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 191</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_search_class'>search_class</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='comma'>,</span> <span class='id identifier rubyid_scope'>scope</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_cls'>cls</span> <span class='op'>=</span> <span class='id identifier rubyid_scope'>scope</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>%CLASS%|[@%$?]</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='id identifier rubyid_cls'>cls</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_constantize'>constantize</span>
<span class='kw'>rescue</span>
  <span class='kw'>nil</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="settings-class_method">
  
    .<strong>settings</strong>  &#x21d2; <tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the settings for the extensions.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The settings for the extensions.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


41
42
43</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazier.rb', line 41</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span>
  <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Thu Nov 10 11:39:23 2016 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.5 (ruby-2.3.0).
</div>

    </div>
  </body>
</html>