Permalink
Browse files

RDoc added

  • Loading branch information...
1 parent a0cf27c commit ff244ed448ffbc4c57f35b37abf65411cb1b47dd @jeroeningen committed Apr 28, 2011
View
13 Rakefile
@@ -44,13 +44,12 @@ begin
gem.email = "jeroeningen@gmail.com"
gem.authors = ["Jeroen van Ingen"]
gem.add_runtime_dependency 'rails', '3.0.7'
- gem.add_development_dependency 'rspec-rails'
- gem.add_development_dependency 'shoulda-matchers'
- gem.add_development_dependency 'autotest'
- gem.add_development_dependency 'autotest-growl'
- gem.add_development_dependency 'rcov'
- gem.add_development_dependency 'metrical'
- gem.add_development_dependency 'activerecord-nulldb-adapter'
+ gem.add_development_dependency 'rspec-rails', '2.5.0'
+ gem.add_development_dependency 'shoulda-matchers', '1.0.0.beta2'
+ gem.add_development_dependency 'autotest', '4.4.6'
+ gem.add_development_dependency 'rcov', '0.9.9'
+ gem.add_development_dependency 'metrical', '0.0.5'
+ gem.add_development_dependency 'activerecord-nulldb-adapter', '0.2.1'
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
View
111 rdoc/classes/ActiveRecord.html
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>Module: ActiveRecord</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActiveRecord</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../files/lib/acts_as_price_rb.html">
+ lib/acts_as_price.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Module <a href="ActiveRecord/Acts.html" class="link">ActiveRecord::Acts</a><br />
+
+ </div>
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
111 rdoc/classes/ActiveRecord/Acts.html
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>Module: ActiveRecord::Acts</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActiveRecord::Acts</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/acts_as_price_rb.html">
+ lib/acts_as_price.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Module <a href="Acts/Price.html" class="link">ActiveRecord::Acts::Price</a><br />
+
+ </div>
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
146 rdoc/classes/ActiveRecord/Acts/Price.html
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>Module: ActiveRecord::Acts::Price</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActiveRecord::Acts::Price</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/acts_as_price_rb.html">
+ lib/acts_as_price.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000001">included</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Module <a href="Price/ClassMethods.html" class="link">ActiveRecord::Acts::Price::ClassMethods</a><br />
+
+ </div>
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000001" class="method-detail">
+ <a name="M000001"></a>
+
+ <div class="method-heading">
+ <a href="#M000001" class="method-signature">
+ <span class="method-name">included</span><span class="method-args">(base)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000001-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price.rb, line 5</span>
+5: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
+6: <span class="ruby-identifier">base</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-constant">ClassMethods</span>)
+7: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
176 rdoc/classes/ActiveRecord/Acts/Price/ClassMethods.html
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>Module: ActiveRecord::Acts::Price::ClassMethods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActiveRecord::Acts::Price::ClassMethods</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../../files/lib/acts_as_price_rb.html">
+ lib/acts_as_price.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000002">acts_as_price</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000002" class="method-detail">
+ <a name="M000002"></a>
+
+ <div class="method-heading">
+ <a href="#M000002" class="method-signature">
+ <span class="method-name">acts_as_price</span><span class="method-args">(column_name, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Specify the column_name that needs to act as price
+</p>
+<p>
+Valid options:
+</p>
+<ul>
+<li>:validates =&gt; true (performs validates_presence_of and
+validates_numericality_of)
+
+</li>
+</ul>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000002-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price.rb, line 14</span>
+14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acts_as_price</span> <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">options</span> = {}
+15: <span class="ruby-identifier">validates</span> <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">:presence</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">:numericality</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:greater_than</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>} <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:validates</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
+16:
+17: <span class="ruby-comment cmt">#setters</span>
+18: <span class="ruby-identifier">define_method</span>(<span class="ruby-node">&quot;#{column_name}=&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
+19: <span class="ruby-keyword kw">super</span>((<span class="ruby-identifier">val</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-value">100</span>).<span class="ruby-identifier">to_s</span>)
+20: <span class="ruby-keyword kw">end</span>
+21: <span class="ruby-identifier">alias_method</span>(<span class="ruby-value str">&quot;price=&quot;</span>, <span class="ruby-node">&quot;#{column_name}=&quot;</span>)
+22:
+23: <span class="ruby-identifier">define_method</span>(<span class="ruby-value str">&quot;price_in_cents=&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
+24: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-value str">&quot;price=&quot;</span>, <span class="ruby-identifier">val</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">100</span>)
+25: <span class="ruby-keyword kw">end</span>
+26: <span class="ruby-identifier">alias_method</span> <span class="ruby-node">&quot;#{column_name}_in_cents=&quot;</span>, <span class="ruby-value str">&quot;price_in_cents=&quot;</span>
+27:
+28: <span class="ruby-comment cmt">#getters</span>
+29: <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">column_name</span>) <span class="ruby-keyword kw">do</span>
+30: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">super</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span><span class="ruby-value">.0</span>
+31: <span class="ruby-value str">&quot;&quot;</span>
+32: <span class="ruby-keyword kw">else</span>
+33: <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">&quot;%.2f&quot;</span>, <span class="ruby-keyword kw">super</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">100</span>)
+34: <span class="ruby-keyword kw">end</span>
+35: <span class="ruby-keyword kw">end</span>
+36: <span class="ruby-identifier">alias_method</span> <span class="ruby-value str">&quot;price&quot;</span>, <span class="ruby-identifier">column_name</span>
+37:
+38: <span class="ruby-identifier">define_method</span>(<span class="ruby-value str">&quot;price_in_cents&quot;</span>) {((<span class="ruby-identifier">send</span> <span class="ruby-identifier">column_name</span>).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-value">100</span>).<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_i</span>}
+39: <span class="ruby-identifier">alias_method</span> <span class="ruby-node">&quot;#{column_name}_in_cents&quot;</span>, <span class="ruby-value str">&quot;price_in_cents&quot;</span>
+40: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
314 rdoc/classes/ActsAsPriceHelper.html
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>Module: ActsAsPriceHelper</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActsAsPriceHelper</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../files/lib/acts_as_price_helper_rb.html">
+ lib/acts_as_price_helper.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000008">columns</a>&nbsp;&nbsp;
+ <a href="#M000006">columns_in_cents</a>&nbsp;&nbsp;
+ <a href="#M000007">columns_in_doubles</a>&nbsp;&nbsp;
+ <a href="#M000003">test_acts_as_price_methods</a>&nbsp;&nbsp;
+ <a href="#M000004">test_setter_in_cents</a>&nbsp;&nbsp;
+ <a href="#M000005">test_setter_in_doubles</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000008" class="method-detail">
+ <a name="M000008"></a>
+
+ <div class="method-heading">
+ <a href="#M000008" class="method-signature">
+ <span class="method-name">columns</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000008-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price_helper.rb, line 73</span>
+73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">columns</span>
+74: <span class="ruby-identifier">columns_in_doubles</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">columns_in_cents</span>
+75: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000006" class="method-detail">
+ <a name="M000006"></a>
+
+ <div class="method-heading">
+ <a href="#M000006" class="method-signature">
+ <span class="method-name">columns_in_cents</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000006-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price_helper.rb, line 65</span>
+65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">columns_in_cents</span>
+66: [<span class="ruby-identifier">:price_in_cents</span>, <span class="ruby-node">&quot;#{@column_name}_in_cents&quot;</span>]
+67: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000007" class="method-detail">
+ <a name="M000007"></a>
+
+ <div class="method-heading">
+ <a href="#M000007" class="method-signature">
+ <span class="method-name">columns_in_doubles</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000007-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price_helper.rb, line 69</span>
+69: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">columns_in_doubles</span>
+70: [<span class="ruby-identifier">:price</span>, <span class="ruby-ivar">@column_name</span>]
+71: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
+
+ <div class="method-heading">
+ <a href="#M000003" class="method-signature">
+ <span class="method-name">test_acts_as_price_methods</span><span class="method-args">(column_name, acts_as_price_model = nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Test the acts_as_price plugin for the specified column_name and model
+</p>
+<p>
+Note the you can also specify the model in a before block in your tests
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000003-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price_helper.rb, line 5</span>
+ 5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_acts_as_price_methods</span> <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">acts_as_price_model</span> = <span class="ruby-keyword kw">nil</span>
+ 6: <span class="ruby-ivar">@acts_as_price_model</span> = <span class="ruby-identifier">acts_as_price_model</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">acts_as_price_model</span>
+ 7:
+ 8: <span class="ruby-ivar">@column_name</span> = <span class="ruby-identifier">column_name</span>
+ 9: <span class="ruby-identifier">columns_in_cents</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
+10: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">price_in_cents</span>
+11: <span class="ruby-keyword kw">end</span>
+12: <span class="ruby-identifier">columns_in_doubles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
+13: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">price</span>
+14: <span class="ruby-keyword kw">end</span>
+15:
+16: <span class="ruby-comment cmt">#normal test for setter</span>
+17: <span class="ruby-identifier">test_setter_in_cents</span> <span class="ruby-value str">&quot;144&quot;</span>
+18: <span class="ruby-identifier">test_setter_in_doubles</span> <span class="ruby-value str">&quot;1.41&quot;</span>
+19:
+20: <span class="ruby-comment cmt">#test for special cases</span>
+21: <span class="ruby-comment cmt">#test if 1.5 is returned as 1.50</span>
+22: <span class="ruby-identifier">test_setter_in_doubles</span> <span class="ruby-value str">&quot;1.5&quot;</span>
+23:
+24: <span class="ruby-comment cmt">#test if float returns 2.05 correctly </span>
+25: <span class="ruby-comment cmt">#float can return 2.05 as 2.04 in some cases</span>
+26: <span class="ruby-identifier">test_setter_in_doubles</span> <span class="ruby-value str">&quot;2.05&quot;</span>
+27:
+28: <span class="ruby-comment cmt">#test an empty_setter</span>
+29: <span class="ruby-identifier">test_setter_in_cents</span> <span class="ruby-value str">&quot;&quot;</span>
+30: <span class="ruby-identifier">test_setter_in_doubles</span> <span class="ruby-value str">&quot;&quot;</span>
+31: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000004" class="method-detail">
+ <a name="M000004"></a>
+
+ <div class="method-heading">
+ <a href="#M000004" class="method-signature">
+ <span class="method-name">test_setter_in_cents</span><span class="method-args">(cents)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000004-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price_helper.rb, line 33</span>
+33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_setter_in_cents</span> <span class="ruby-identifier">cents</span>
+34: <span class="ruby-identifier">columns_in_cents</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">setter</span><span class="ruby-operator">|</span>
+35: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{setter}=&quot;</span>, <span class="ruby-identifier">cents</span>)
+36: <span class="ruby-identifier">columns_in_cents</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">getter</span><span class="ruby-operator">|</span>
+37: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">cents</span>.<span class="ruby-identifier">to_i</span>
+38: <span class="ruby-keyword kw">end</span>
+39: <span class="ruby-identifier">columns_in_doubles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">getter</span><span class="ruby-operator">|</span>
+40: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cents</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
+41: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
+42: <span class="ruby-keyword kw">else</span>
+43: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">&quot;%.2f&quot;</span>, (<span class="ruby-identifier">cents</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">100</span>).<span class="ruby-identifier">to_s</span>)
+44: <span class="ruby-keyword kw">end</span>
+45: <span class="ruby-keyword kw">end</span>
+46: <span class="ruby-keyword kw">end</span>
+47: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000005" class="method-detail">
+ <a name="M000005"></a>
+
+ <div class="method-heading">
+ <a href="#M000005" class="method-signature">
+ <span class="method-name">test_setter_in_doubles</span><span class="method-args">(double)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000005-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/acts_as_price_helper.rb, line 49</span>
+49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_setter_in_doubles</span> <span class="ruby-identifier">double</span>
+50: <span class="ruby-identifier">columns_in_doubles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">setter</span><span class="ruby-operator">|</span>
+51: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{setter}=&quot;</span>, <span class="ruby-identifier">double</span>)
+52: <span class="ruby-identifier">columns_in_cents</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">getter</span><span class="ruby-operator">|</span>
+53: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">double</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-value">100</span>).<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_i</span>
+54: <span class="ruby-keyword kw">end</span>
+55: <span class="ruby-identifier">columns_in_doubles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">getter</span><span class="ruby-operator">|</span>
+56: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">double</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
+57: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
+58: <span class="ruby-keyword kw">else</span>
+59: <span class="ruby-ivar">@acts_as_price_model</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>).<span class="ruby-identifier">should</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">&quot;%.2f&quot;</span>, <span class="ruby-identifier">double</span>)
+60: <span class="ruby-keyword kw">end</span>
+61: <span class="ruby-keyword kw">end</span>
+62: <span class="ruby-keyword kw">end</span>
+63: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
1 rdoc/created.rid
@@ -0,0 +1 @@
+Mon, 25 Apr 2011 15:18:30 -0700
View
205 rdoc/files/README_rdoc.html
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>File: README.rdoc</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>README.rdoc</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>README.rdoc
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Mon Apr 25 15:18:27 -0700 2011</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <h1>INSTALLATION</h1>
+<p>
+rails plugin install git@github.com:jeroeningen/acts_as_price.git
+</p>
+<h1>USAGE</h1>
+<p>
+Create a column in the table of your database which you want to acts as a
+price.
+</p>
+<p>
+NOTE THAT THE COLUMN MUST BE OF THE TYPE INTEGER.
+</p>
+<p>
+In your model add the following:
+</p>
+<ul>
+<li>acts_as_price &lt;column_name&gt;, :validates = true
+
+</li>
+</ul>
+<p>
+&lt;column_name&gt; is the name of your database column e.g. price or
+price_per_liter.
+</p>
+<p>
+This plugin creates the following getters and setters:
+</p>
+<ul>
+<li>&#8216;price_in_cents&#8217; and &#8217;&lt;column_name&gt;_in_cents&#8217;
+sets and returns the price in cents
+
+</li>
+<li>&#8216;price&#8217; and &#8217;&lt;column_name&gt;&#8217; sets and returns
+the price
+
+</li>
+</ul>
+<h1>EXAMPLES</h1>
+<p>
+car = Car.new :price =&gt; 12999
+</p>
+<p>
+car.price 12999.00
+</p>
+<p>
+car.price_in_cents 1299900
+</p>
+<p>
+fuel = Fueltype.new :price_per_liter =&gt; 1.12
+</p>
+<p>
+fuel.price 1.12
+</p>
+<p>
+fuel.price_in_cents 112
+</p>
+<p>
+fuel.price_per_liter 1.12
+</p>
+<p>
+fuel.price_per_liter_in_cents 1.12
+</p>
+<h1>RSPEC INTERGRATION</h1>
+<p>
+Acts As Price comes with a helper method to automatically test the plugin
+using Rspec.
+</p>
+<p>
+To use this method please add the following to your spec_helper.rb file:
+</p>
+<ul>
+<li>config.include(ActsAsPriceHelper)
+
+</li>
+</ul>
+<p>
+Now you may add the following code to your spec-files for your models:
+</p>
+<pre>
+ context &quot;given an valid model&quot; do
+ it &quot;should acts as price&quot; do
+ test_acts_as_price_methods &lt;column_name&gt;, &lt;fixture or stub&gt;
+ end
+ end
+</pre>
+<h1>TESTING</h1>
+<p>
+To test the plugin use the command &#8216;rake test&#8217; or &#8216;rspec
+spec/*_spec.rb&#8217; inside the dir
+&#8217;~/vendor/plugins/acts_as_price&#8216;
+</p>
+<h1>NOTES</h1>
+<p>
+This plugin comes with Rspec tests. However this plugin assumes that you
+have a database configuration, it actually don&#8216;t use the database for
+the Rspec tests.
+</p>
+<h1>FEEDBACK AND BUGS REPORTS</h1>
+<p>
+For feedback and bug reports contact: jeroeningen@gmail.com
+</p>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
101 rdoc/files/lib/acts_as_price_helper_rb.html
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>File: acts_as_price_helper.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>acts_as_price_helper.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/acts_as_price_helper.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Mon Apr 25 15:00:23 -0700 2011</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
101 rdoc/files/lib/acts_as_price_rb.html
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>
+ <title>File: acts_as_price.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>acts_as_price.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/acts_as_price.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Mon Apr 25 15:00:23 -0700 2011</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
31 rdoc/fr_class_index.html
@@ -0,0 +1,31 @@
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+
+ Classes
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Classes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div id="index">
+ <h1 class="section-bar">Classes</h1>
+ <div id="index-entries">
+ <a href="classes/ActiveRecord.html">ActiveRecord</a><br />
+ <a href="classes/ActiveRecord/Acts.html">ActiveRecord::Acts</a><br />
+ <a href="classes/ActiveRecord/Acts/Price.html">ActiveRecord::Acts::Price</a><br />
+ <a href="classes/ActiveRecord/Acts/Price/ClassMethods.html">ActiveRecord::Acts::Price::ClassMethods</a><br />
+ <a href="classes/ActsAsPriceHelper.html">ActsAsPriceHelper</a><br />
+ </div>
+</div>
+</body>
+</html>
View
29 rdoc/fr_file_index.html
@@ -0,0 +1,29 @@
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+
+ Files
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Files</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div id="index">
+ <h1 class="section-bar">Files</h1>
+ <div id="index-entries">
+ <a href="files/README_rdoc.html">README.rdoc</a><br />
+ <a href="files/lib/acts_as_price_rb.html">lib/acts_as_price.rb</a><br />
+ <a href="files/lib/acts_as_price_helper_rb.html">lib/acts_as_price_helper.rb</a><br />
+ </div>
+</div>
+</body>
+</html>
View
34 rdoc/fr_method_index.html
@@ -0,0 +1,34 @@
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+
+ Methods
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Methods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div id="index">
+ <h1 class="section-bar">Methods</h1>
+ <div id="index-entries">
+ <a href="classes/ActiveRecord/Acts/Price/ClassMethods.html#M000002">acts_as_price (ActiveRecord::Acts::Price::ClassMethods)</a><br />
+ <a href="classes/ActsAsPriceHelper.html#M000008">columns (ActsAsPriceHelper)</a><br />
+ <a href="classes/ActsAsPriceHelper.html#M000006">columns_in_cents (ActsAsPriceHelper)</a><br />
+ <a href="classes/ActsAsPriceHelper.html#M000007">columns_in_doubles (ActsAsPriceHelper)</a><br />
+ <a href="classes/ActiveRecord/Acts/Price.html#M000001">included (ActiveRecord::Acts::Price)</a><br />
+ <a href="classes/ActsAsPriceHelper.html#M000003">test_acts_as_price_methods (ActsAsPriceHelper)</a><br />
+ <a href="classes/ActsAsPriceHelper.html#M000004">test_setter_in_cents (ActsAsPriceHelper)</a><br />
+ <a href="classes/ActsAsPriceHelper.html#M000005">test_setter_in_doubles (ActsAsPriceHelper)</a><br />
+ </div>
+</div>
+</body>
+</html>
View
24 rdoc/index.html
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+
+<!--
+
+ ActsAsPrice
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>ActsAsPrice</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<frameset rows="20%, 80%">
+ <frameset cols="25%,35%,45%">
+ <frame src="fr_file_index.html" title="Files" name="Files" />
+ <frame src="fr_class_index.html" name="Classes" />
+ <frame src="fr_method_index.html" name="Methods" />
+ </frameset>
+ <frame src="files/README_rdoc.html" name="docwin" />
+</frameset>
+</html>
View
208 rdoc/rdoc-style.css
@@ -0,0 +1,208 @@
+
+body {
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size: 90%;
+ margin: 0;
+ margin-left: 40px;
+ padding: 0;
+ background: white;
+}
+
+h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
+h1 { font-size: 150%; }
+h2,h3,h4 { margin-top: 1em; }
+
+a { background: #eef; color: #039; text-decoration: none; }
+a:hover { background: #039; color: #eef; }
+
+/* Override the base stylesheet's Anchor inside a table cell */
+td > a {
+ background: transparent;
+ color: #039;
+ text-decoration: none;
+}
+
+/* and inside a section title */
+.section-title > a {
+ background: transparent;
+ color: #eee;
+ text-decoration: none;
+}
+
+/* === Structural elements =================================== */
+
+div#index {
+ margin: 0;
+ margin-left: -40px;
+ padding: 0;
+ font-size: 90%;
+}
+
+
+div#index a {
+ margin-left: 0.7em;
+}
+
+div#index .section-bar {
+ margin-left: 0px;
+ padding-left: 0.7em;
+ background: #ccc;
+ font-size: small;
+}
+
+
+div#classHeader, div#fileHeader {
+ width: auto;
+ color: white;
+ padding: 0.5em 1.5em 0.5em 1.5em;
+ margin: 0;
+ margin-left: -40px;
+ border-bottom: 3px solid #006;
+}
+
+div#classHeader a, div#fileHeader a {
+ background: inherit;
+ color: white;
+}
+
+div#classHeader td, div#fileHeader td {
+ background: inherit;
+ color: white;
+}
+
+
+div#fileHeader {
+ background: #057;
+}
+
+div#classHeader {
+ background: #048;
+}
+
+
+.class-name-in-header {
+ font-size: 180%;
+ font-weight: bold;
+}
+
+
+div#bodyContent {
+ padding: 0 1.5em 0 1.5em;
+}
+
+div#description {
+ padding: 0.5em 1.5em;
+ background: #efefef;
+ border: 1px dotted #999;
+}
+
+div#description h1,h2,h3,h4,h5,h6 {
+ color: #125;;
+ background: transparent;
+}
+
+div#validator-badges {
+ text-align: center;
+}
+div#validator-badges img { border: 0; }
+
+div#copyright {
+ color: #333;
+ background: #efefef;
+ font: 0.75em sans-serif;
+ margin-top: 5em;
+ margin-bottom: 0;
+ padding: 0.5em 2em;
+}
+
+
+/* === Classes =================================== */
+
+table.header-table {
+ color: white;
+ font-size: small;
+}
+
+.type-note {
+ font-size: small;
+ color: #DEDEDE;
+}
+
+.xxsection-bar {
+ background: #eee;
+ color: #333;
+ padding: 3px;
+}
+
+.section-bar {
+ color: #333;
+ border-bottom: 1px solid #999;
+ margin-left: -20px;
+}
+
+
+.section-title {
+ background: #79a;
+ color: #eee;
+ padding: 3px;
+ margin-top: 2em;
+ margin-left: -30px;
+ border: 1px solid #999;
+}
+
+.top-aligned-row { vertical-align: top }
+.bottom-aligned-row { vertical-align: bottom }
+
+/* --- Context section classes ----------------------- */
+
+.context-row { }
+.context-item-name { font-family: monospace; font-weight: bold; color: black; }
+.context-item-value { font-size: small; color: #448; }
+.context-item-desc { color: #333; padding-left: 2em; }
+
+/* --- Method classes -------------------------- */
+.method-detail {
+ background: #efefef;
+ padding: 0;
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+ border: 1px dotted #ccc;
+}
+.method-heading {
+ color: black;
+ background: #ccc;
+ border-bottom: 1px solid #666;
+ padding: 0.2em 0.5em 0 0.5em;
+}
+.method-signature { color: black; background: inherit; }
+.method-name { font-weight: bold; }
+.method-args { font-style: italic; }
+.method-description { padding: 0 0.5em 0 0.5em; }
+
+/* --- Source code sections -------------------- */
+
+a.source-toggle { font-size: 90%; }
+div.method-source-code {
+ background: #262626;
+ color: #ffdead;
+ margin: 1em;
+ padding: 0.5em;
+ border: 1px dashed #999;
+ overflow: hidden;
+}
+
+div.method-source-code pre { color: #ffdead; overflow: hidden; }
+
+/* --- Ruby keyword styles --------------------- */
+
+.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
+
+.ruby-constant { color: #7fffd4; background: transparent; }
+.ruby-keyword { color: #00ffff; background: transparent; }
+.ruby-ivar { color: #eedd82; background: transparent; }
+.ruby-operator { color: #00ffee; background: transparent; }
+.ruby-identifier { color: #ffdead; background: transparent; }
+.ruby-node { color: #ffa07a; background: transparent; }
+.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
+.ruby-regexp { color: #ffa07a; background: transparent; }
+.ruby-value { color: #7fffd4; background: transparent; }

0 comments on commit ff244ed

Please sign in to comment.