rootstrap/exception_hunter

View on GitHub
docs/ExceptionHunter/Config.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>
  Class: ExceptionHunter::Config
  
    &mdash; Documentation by YARD 0.9.26
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" />

<script type="text/javascript">
  pathId = "ExceptionHunter::Config";
  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?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../_index.html">Index (C)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../ExceptionHunter.html" title="ExceptionHunter (module)">ExceptionHunter</a></span></span>
     &raquo; 
    <span class="title">Config</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>

      <div id="content"><h1>Class: ExceptionHunter::Config
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ExceptionHunter::Config</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/exception_hunter/config.rb</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Config singleton class used to customize ExceptionHunter</p>


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

</div>



  <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#admin_user_class-instance_method" title="#admin_user_class (instance method)">#<strong>admin_user_class</strong>  &#x21d2; String </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The name of the admin class (generally AdminUser).</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#async_logging-instance_method" title="#async_logging (instance method)">#<strong>async_logging</strong>  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Whether ExceptionHunter should log async or not.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#current_user_method-instance_method" title="#current_user_method (instance method)">#<strong>current_user_method</strong>  &#x21d2; Symbol </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The name of the current user method provided by Devise.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#enabled-instance_method" title="#enabled (instance method)">#<strong>enabled</strong>  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Whether ExceptionHunter is active or not.</p>
</div></span>
  
</li>

    
  </ul>




  
    <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="#auth_enabled%3F-class_method" title="auth_enabled? (class method)">.<strong>auth_enabled?</strong>  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns true if there&#39;s an admin user class configured to authenticate against.</p>
</div></span>
  
</li>

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

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#errors_stale_time-instance_method" title="#errors_stale_time (instance method)">#<strong>errors_stale_time</strong>  &#x21d2; Numeric </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Number of days until an error is considered stale.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#notifiers-instance_method" title="#notifiers (instance method)">#<strong>notifiers</strong>  &#x21d2; Array&lt;Hash&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Configured notifiers for the application (see <span class='object_link'><a href="Notifiers.html" title="ExceptionHunter::Notifiers (module)">Notifiers</a></span>).</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#user_attributes-instance_method" title="#user_attributes (instance method)">#<strong>user_attributes</strong>  &#x21d2; Array&lt;Symbol&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Attributes to whitelist on the user (see <span class='object_link'><a href="UserAttributesCollector.html" title="ExceptionHunter::UserAttributesCollector (module)">UserAttributesCollector</a></span>).</p>
</div></span>
  
</li>

      
    </ul>
  


  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="admin_user_class=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="admin_user_class-instance_method">
  
    #<strong>admin_user_class</strong>  &#x21d2; <tt>String</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the name of the admin class (generally AdminUser).</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the name of the admin class (generally AdminUser)</p>
</div>
      
    </li>
  
</ul>

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


9</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 9</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:admin_user_class</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="async_logging=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="async_logging-instance_method">
  
    #<strong>async_logging</strong>  &#x21d2; <tt>Boolean</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns whether ExceptionHunter should log async or not.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>whether ExceptionHunter should log async or not</p>
</div>
      
    </li>
  
</ul>

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


22</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 22</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:async_logging</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='kw'>false</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="current_user_method=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="current_user_method-instance_method">
  
    #<strong>current_user_method</strong>  &#x21d2; <tt>Symbol</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the name of the current user method provided by Devise.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the name of the current user method provided by Devise</p>
</div>
      
    </li>
  
</ul>

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


12</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 12</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:current_user_method</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="enabled=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="enabled-instance_method">
  
    #<strong>enabled</strong>  &#x21d2; <tt>Boolean</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns whether ExceptionHunter is active or not.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>whether ExceptionHunter is active or not</p>
</div>
      
    </li>
  
</ul>

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


6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 6</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:enabled</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='kw'>true</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


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

    
      <div class="method_details first">
  <h3 class="signature first" id="auth_enabled?-class_method">
  
    .<strong>auth_enabled?</strong>  &#x21d2; <tt>Boolean</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns true if there&#39;s an admin user class configured to authenticate against.</p>


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

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


28
29
30</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 28</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_auth_enabled?'>auth_enabled?</span>
  <span class='id identifier rubyid_admin_user_class'>admin_user_class</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_admin_user_class'>admin_user_class</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:underscore</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="errors_stale_time-instance_method">
  
    #<strong>errors_stale_time</strong>  &#x21d2; <tt>Numeric</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns number of days until an error is considered stale.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Numeric</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>number of days until an error is considered stale</p>
</div>
      
    </li>
  
</ul>

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


16</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 16</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:errors_stale_time</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>45</span><span class='period'>.</span><span class='id identifier rubyid_days'>days</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="notifiers-instance_method">
  
    #<strong>notifiers</strong>  &#x21d2; <tt>Array&lt;Hash&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns configured notifiers for the application (see <span class='object_link'><a href="Notifiers.html" title="ExceptionHunter::Notifiers (module)">Notifiers</a></span>).</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;Hash&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>configured notifiers for the application (see <span class='object_link'><a href="Notifiers.html" title="ExceptionHunter::Notifiers (module)">Notifiers</a></span>)</p>
</div>
      
    </li>
  
</ul>

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


18</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 18</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:notifiers</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="user_attributes-instance_method">
  
    #<strong>user_attributes</strong>  &#x21d2; <tt>Array&lt;Symbol&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns attributes to whitelist on the user (see <span class='object_link'><a href="UserAttributesCollector.html" title="ExceptionHunter::UserAttributesCollector (module)">UserAttributesCollector</a></span>).</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>attributes to whitelist on the user (see <span class='object_link'><a href="UserAttributesCollector.html" title="ExceptionHunter::UserAttributesCollector (module)">UserAttributesCollector</a></span>)</p>
</div>
      
    </li>
  
</ul>

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


14</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 14</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:user_attributes</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Fri Jul 30 14:46:20 2021 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.26 (ruby-2.6.5).
</div>

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