<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Class: TableFu::Formatting</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '..';
  if (relpath != '') 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>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (F)</a> &raquo; 
    <span class='title'>TableFu</span>
     &raquo; 
    <span class="title">Formatting</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: TableFu::Formatting 
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">TableFu::Formatting</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/table_setter/table.rb</dd>
  
</dl>
<div class="clear"></div>




  <h2>Class Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#bar-class_method" title="bar (class method)">+ (Object) <strong>bar</strong>(percent) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">
In order to show a sideways bar chart, we&#8217;re extending the builtin
TableFu formatters.

</span>
  
</li>

    
  </ul>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="bar-class_method">
  
    + (<tt>Object</tt>) <strong>bar</strong>(percent) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
In order to show a sideways bar chart, we&#8217;re extending the builtin
TableFu formatters.
</p>


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


218
219
220
221
222
223
224</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/table_setter/table.rb', line 218</span>

<span class='def def kw'>def</span> <span class='bar identifier id'>bar</span><span class='lparen token'>(</span><span class='percent identifier id'>percent</span><span class='rparen token'>)</span>
  <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='percent identifier id'>percent</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span>
  <span class='if if kw'>if</span> <span class='percent identifier id'>percent</span> <span class='lt op'>&lt;</span> <span class='integer val'>1</span>
    <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='percent identifier id'>percent</span> <span class='mult op'>*</span> <span class='integer val'>100</span>
  <span class='end end kw'>end</span>
  <span class='dstring node'>&quot;&lt;div class=\&quot;bar\&quot; style=\&quot;width:#{percent}%\&quot;&gt;#{percent}%&lt;/div&gt;&quot;</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Tue Mar  9 17:18:07 2010 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.7).
</div>

  </body>
</html>