rootstrap/exception_hunter

View on GitHub
docs/ExceptionHunter/DashboardPresenter.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::DashboardPresenter
  
    &mdash; Documentation by YARD 0.9.25
  
</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::DashboardPresenter";
  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 (D)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../ExceptionHunter.html" title="ExceptionHunter (module)">ExceptionHunter</a></span></span>
     &raquo; 
    <span class="title">DashboardPresenter</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::DashboardPresenter
  
  
  
</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::DashboardPresenter</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>app/presenters/exception_hunter/dashboard_presenter.rb</dd>
  </dl>
  
</div>

<div class="docstring">
  <div class="discussion">
    

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

</div>
  
    <h2>
      Constant Summary
      <small><a href="#" class="constants_summary_toggle">collapse</a></small>
    </h2>

    <dl class="constants">
      
        <dt id="LAST_7_DAYS_TAB-constant" class="">LAST_7_DAYS_TAB =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>last_7_days</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="CURRENT_MONTH_TAB-constant" class="">CURRENT_MONTH_TAB =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>current_month</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="TOTAL_ERRORS_TAB-constant" class="">TOTAL_ERRORS_TAB =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>total_errors</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="RESOLVED_ERRORS_TAB-constant" class="">RESOLVED_ERRORS_TAB =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>resolved</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="TABS-constant" class="">TABS =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LAST_7_DAYS_TAB-constant" title="ExceptionHunter::DashboardPresenter::LAST_7_DAYS_TAB (constant)">LAST_7_DAYS_TAB</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#CURRENT_MONTH_TAB-constant" title="ExceptionHunter::DashboardPresenter::CURRENT_MONTH_TAB (constant)">CURRENT_MONTH_TAB</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#TOTAL_ERRORS_TAB-constant" title="ExceptionHunter::DashboardPresenter::TOTAL_ERRORS_TAB (constant)">TOTAL_ERRORS_TAB</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#RESOLVED_ERRORS_TAB-constant" title="ExceptionHunter::DashboardPresenter::RESOLVED_ERRORS_TAB (constant)">RESOLVED_ERRORS_TAB</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="DEFAULT_TAB-constant" class="">DEFAULT_TAB =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='const'><span class='object_link'><a href="#LAST_7_DAYS_TAB-constant" title="ExceptionHunter::DashboardPresenter::LAST_7_DAYS_TAB (constant)">LAST_7_DAYS_TAB</a></span></span></pre></dd>
      
    </dl>
  




  <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="#current_tab-instance_method" title="#current_tab (instance method)">#<strong>current_tab</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></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_count-instance_method" title="#errors_count (instance method)">#<strong>errors_count</strong>(tab)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

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

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A new instance of DashboardPresenter.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#tab_active%3F-instance_method" title="#tab_active? (instance method)">#<strong>tab_active?</strong>(tab)  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    #<strong>initialize</strong>(current_tab)  &#x21d2; <tt><span class='object_link'><a href="" title="ExceptionHunter::DashboardPresenter (class)">DashboardPresenter</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a new instance of DashboardPresenter.</p>


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

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


12
13
14
15</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/presenters/exception_hunter/dashboard_presenter.rb', line 12</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_current_tab'>current_tab</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_assign_tab'>assign_tab</span><span class='lparen'>(</span><span class='id identifier rubyid_current_tab'>current_tab</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_calculate_tabs_counts'>calculate_tabs_counts</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id=""></span>
      <div class="method_details first">
  <h3 class="signature first" id="current_tab-instance_method">
  
    #<strong>current_tab</strong>  &#x21d2; <tt>Object</tt>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

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


10
11
12</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/presenters/exception_hunter/dashboard_presenter.rb', line 10</span>

<span class='kw'>def</span> <span class='id identifier rubyid_current_tab'>current_tab</span>
  <span class='ivar'>@current_tab</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_count-instance_method">
  
    #<strong>errors_count</strong>(tab)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

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


30
31
32</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/presenters/exception_hunter/dashboard_presenter.rb', line 30</span>

<span class='kw'>def</span> <span class='id identifier rubyid_errors_count'>errors_count</span><span class='lparen'>(</span><span class='id identifier rubyid_tab'>tab</span><span class='rparen'>)</span>
  <span class='ivar'>@tabs_counts</span><span class='lbracket'>[</span><span class='id identifier rubyid_tab'>tab</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="partial_for_tab-instance_method">
  
    #<strong>partial_for_tab</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

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


21
22
23
24
25
26
27
28</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/presenters/exception_hunter/dashboard_presenter.rb', line 21</span>

<span class='kw'>def</span> <span class='id identifier rubyid_partial_for_tab'>partial_for_tab</span>
  <span class='kw'>case</span> <span class='id identifier rubyid_current_tab'>current_tab</span>
  <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#LAST_7_DAYS_TAB-constant" title="ExceptionHunter::DashboardPresenter::LAST_7_DAYS_TAB (constant)">LAST_7_DAYS_TAB</a></span></span>
    <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>exception_hunter/errors/last_7_days_errors_table</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#CURRENT_MONTH_TAB-constant" title="ExceptionHunter::DashboardPresenter::CURRENT_MONTH_TAB (constant)">CURRENT_MONTH_TAB</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#TOTAL_ERRORS_TAB-constant" title="ExceptionHunter::DashboardPresenter::TOTAL_ERRORS_TAB (constant)">TOTAL_ERRORS_TAB</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#RESOLVED_ERRORS_TAB-constant" title="ExceptionHunter::DashboardPresenter::RESOLVED_ERRORS_TAB (constant)">RESOLVED_ERRORS_TAB</a></span></span>
    <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>exception_hunter/errors/errors_table</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="tab_active?-instance_method">
  
    #<strong>tab_active?</strong>(tab)  &#x21d2; <tt>Boolean</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

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


17
18
19</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/presenters/exception_hunter/dashboard_presenter.rb', line 17</span>

<span class='kw'>def</span> <span class='id identifier rubyid_tab_active?'>tab_active?</span><span class='lparen'>(</span><span class='id identifier rubyid_tab'>tab</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_tab'>tab</span> <span class='op'>==</span> <span class='id identifier rubyid_current_tab'>current_tab</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Sat Oct 10 10:59:37 2020 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.25 (ruby-2.6.5).
</div>

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