Browse files

update docs

  • Loading branch information...
1 parent 885fbaf commit 37bc093df1416aba0de958367a769f339e7d10ac @nate nate committed Apr 9, 2010
Showing with 6,337 additions and 98 deletions.
  1. +17 −13 classes/Array.html
  2. +121 −3 classes/Forgery.html
  3. +627 −0 classes/Forgery/Address.html
  4. +531 −0 classes/Forgery/Basic.html
  5. +214 −0 classes/Forgery/Dictionaries.html
  6. +436 −0 classes/Forgery/FileReader.html
  7. +214 −0 classes/Forgery/Formats.html
  8. +211 −0 classes/Forgery/Internet.html
  9. +523 −0 classes/Forgery/LoremIpsum.html
  10. +143 −0 classes/Forgery/Monetary.html
  11. +341 −0 classes/Forgery/Name.html
  12. +247 −0 classes/Forgery/Personal.html
  13. +12 −8 classes/Hash.html
  14. +10 −8 classes/Object.html
  15. +10 −8 classes/Range.html
  16. +32 −22 classes/String.html
  17. +1 −1 created.rid
  18. +15 −0 css/main.css
  19. +1 −1 files/LICENSE.html
  20. +37 −22 files/README_markdown.html
  21. +125 −0 files/lib/forgery/dictionaries/cities.html
  22. +60 −0 files/lib/forgery/dictionaries/colors.html
  23. +102 −0 files/lib/forgery/dictionaries/company_names.html
  24. +97 −0 files/lib/forgery/dictionaries/countries.html
  25. +68 −0 files/lib/forgery/dictionaries/female_first_names.html
  26. +59 −0 files/lib/forgery/dictionaries/frequencies.html
  27. +59 −0 files/lib/forgery/dictionaries/genders.html
  28. +70 −0 files/lib/forgery/dictionaries/languages.html
  29. +83 −0 files/lib/forgery/dictionaries/last_names.html
  30. +145 −0 files/lib/forgery/dictionaries/lorem_ipsum.html
  31. +68 −0 files/lib/forgery/dictionaries/male_first_names.html
  32. +59 −0 files/lib/forgery/dictionaries/name_titles.html
  33. +61 −0 files/lib/forgery/dictionaries/provinces.html
  34. +72 −0 files/lib/forgery/dictionaries/races.html
  35. +65 −0 files/lib/forgery/dictionaries/states.html
  36. +60 −0 files/lib/forgery/dictionaries/street_suffixes.html
  37. +116 −0 files/lib/forgery/dictionaries/streets.html
  38. +59 −0 files/lib/forgery/dictionaries/top_level_domains.html
  39. +59 −0 files/lib/forgery/dictionaries_rb.html
  40. +59 −0 files/lib/forgery/extensions/array_rb.html
  41. +59 −0 files/lib/forgery/extensions/hash_rb.html
  42. +59 −0 files/lib/forgery/extensions/range_rb.html
  43. +59 −0 files/lib/forgery/extensions/string_rb.html
  44. +59 −0 files/lib/forgery/file_reader_rb.html
  45. +59 −0 files/lib/forgery/forgery/address_rb.html
  46. +59 −0 files/lib/forgery/forgery/basic_rb.html
  47. +52 −0 files/lib/forgery/forgery/internet_rb.html
  48. +52 −0 files/lib/forgery/forgery/lorem_ipsum_rb.html
  49. +52 −0 files/lib/forgery/forgery/monetary_rb.html
  50. +52 −0 files/lib/forgery/forgery/name_rb.html
  51. +52 −0 files/lib/forgery/forgery/personal_rb.html
  52. +67 −0 files/lib/forgery/forgery_api_rb.html
  53. +59 −0 files/lib/forgery/forgery_rb.html
  54. +59 −0 files/lib/forgery/formats/phone.html
  55. +52 −0 files/lib/forgery/formats/street_number.html
  56. +59 −0 files/lib/forgery/formats/zip.html
  57. +59 −0 files/lib/forgery/formats_rb.html
  58. +59 −0 files/lib/forgery/version_rb.html
  59. +18 −10 files/lib/forgery_rb.html
  60. +1 −1 panel/search_index.js
  61. +1 −1 panel/tree.js
View
30 classes/Array.html
@@ -27,7 +27,7 @@
</h1>
<ul class="files">
- <li><a href="../files/lib/extensions/array_rb.html">lib/extensions/array.rb</a></li>
+ <li><a href="../files/lib/forgery/extensions/array_rb.html">lib/forgery/extensions/array.rb</a></li>
</ul>
</div>
@@ -49,9 +49,9 @@
<dd>
<ul>
- <li><a href="#M000004">random</a>,</li>
+ <li><a href="#M000000">random</a>,</li>
- <li><a href="#M000005">random_subset</a></li>
+ <li><a href="#M000001">random_subset</a></li>
</ul>
</dd>
@@ -73,9 +73,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
- <div class="title" id="M000004">
+ <div class="title" id="M000000">
- <a name="M000004"></a><b>random</b>()
+ <a name="M000000"></a><b>random</b>()
</div>
@@ -84,11 +84,13 @@
<div class="sourcecode">
<p class="source-link">
- Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
+ Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/extensions/array.rb#L2" target="_blank" class="github_url">on GitHub</a>
</p>
- <div id="M000004_source" class="dyn-source">
- <pre><span class="ruby-comment cmt"># File lib/extensions/array.rb, line 2</span>
+ <div id="M000000_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/extensions/array.rb, line 2</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random</span>
<span class="ruby-keyword kw">self</span>[<span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">rand</span>(<span class="ruby-identifier">size</span>)]
<span class="ruby-keyword kw">end</span></pre>
@@ -98,9 +100,9 @@
</div>
<div class="method">
- <div class="title" id="M000005">
+ <div class="title" id="M000001">
- <a name="M000005"></a><b>random_subset</b>(len=2)
+ <a name="M000001"></a><b>random_subset</b>(len=2)
</div>
@@ -109,11 +111,13 @@
<div class="sourcecode">
<p class="source-link">
- Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
+ Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/extensions/array.rb#L6" target="_blank" class="github_url">on GitHub</a>
</p>
- <div id="M000005_source" class="dyn-source">
- <pre><span class="ruby-comment cmt"># File lib/extensions/array.rb, line 6</span>
+ <div id="M000001_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/extensions/array.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random_subset</span>(<span class="ruby-identifier">len</span>=<span class="ruby-value">2</span>)
<span class="ruby-identifier">rs</span> = []
<span class="ruby-identifier">len</span>.<span class="ruby-identifier">times</span> { <span class="ruby-identifier">rs</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">random</span> }
View
124 classes/Forgery.html
@@ -27,7 +27,15 @@
</h1>
<ul class="files">
- <li><a href="../files/lib/forgery_rb.html">lib/forgery.rb</a></li>
+ <li><a href="../files/lib/forgery/dictionaries_rb.html">lib/forgery/dictionaries.rb</a></li>
+
+ <li><a href="../files/lib/forgery/file_reader_rb.html">lib/forgery/file_reader.rb</a></li>
+
+ <li><a href="../files/lib/forgery/forgery_rb.html">lib/forgery/forgery.rb</a></li>
+
+ <li><a href="../files/lib/forgery/formats_rb.html">lib/forgery/formats.rb</a></li>
+
+ <li><a href="../files/lib/forgery/version_rb.html">lib/forgery/version.rb</a></li>
</ul>
</div>
@@ -63,6 +71,17 @@
</ul>
</dd>
+ <dt>R</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000078">rails?</a>,</li>
+
+ <li><a href="#M000077">rails_root</a></li>
+
+ </ul>
+ </dd>
+
</dl>
@@ -71,8 +90,45 @@
+ <div class="sectiontitle">Classes and Modules</div>
+ <ul>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Address.html">Forgery::Address</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Basic.html">Forgery::Basic</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Dictionaries.html">Forgery::Dictionaries</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/FileReader.html">Forgery::FileReader</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Formats.html">Forgery::Formats</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Internet.html">Forgery::Internet</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/LoremIpsum.html">Forgery::LoremIpsum</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Monetary.html">Forgery::Monetary</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Name.html">Forgery::Name</a></li>
+
+ <li><span class="type">CLASS</span> <a href="Forgery/Personal.html">Forgery::Personal</a></li>
+
+ </ul>
+
+ <div class="sectiontitle">Constants</div>
+ <table border='0' cellpadding='5'>
+
+ <tr valign='top'>
+ <td class="attr-name">VERSION</td>
+ <td>=</td>
+ <td class="attr-value">&quot;0.3.1&quot;</td>
+ </tr>
+
+
+ </table>
+
@@ -93,9 +149,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">show</a>
+ | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L3" target="_blank" class="github_url">on GitHub</a>
+
</p>
<div id="M000075_source" class="dyn-source">
- <pre><span class="ruby-comment cmt"># File lib/forgery.rb, line 16</span>
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 3</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dictionaries</span>
<span class="ruby-ivar">@@dictionaries</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Dictionaries</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword kw">end</span></pre>
@@ -118,9 +176,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">show</a>
+ | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L7" target="_blank" class="github_url">on GitHub</a>
+
</p>
<div id="M000076_source" class="dyn-source">
- <pre><span class="ruby-comment cmt"># File lib/forgery.rb, line 20</span>
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 7</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">formats</span>
<span class="ruby-ivar">@@formats</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Formats</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword kw">end</span></pre>
@@ -129,6 +189,64 @@
</div>
+ <div class="method">
+ <div class="title" id="M000078">
+
+ <a name="M000078"></a><b>rails?</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000078_source')" id="l_M000078_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L19" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000078_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 19</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rails?</span>
+ <span class="ruby-operator">!</span><span class="ruby-identifier">rails_root</span>.<span class="ruby-identifier">nil?</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000077">
+
+ <a name="M000077"></a><b>rails_root</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L11" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000077_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 11</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rails_root</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Rails</span>)
+ <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">to_s</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RAILS_ROOT</span>)
+ <span class="ruby-constant">RAILS_ROOT</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
</div>
</div>
</body>
View
627 classes/Forgery/Address.html
@@ -0,0 +1,627 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!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>Forgery::Address</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
+ <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
+</head>
+
+<body>
+ <div class="banner">
+ <h1>
+ <span class="type">Class</span>
+ Forgery::Address
+
+ <span class="parent">&lt;
+
+ <a href="../Forgery.html">Forgery</a>
+
+ </span>
+
+ </h1>
+ <ul class="files">
+
+ <li><a href="../../files/lib/forgery/forgery/address_rb.html">lib/forgery/forgery/address.rb</a></li>
+
+ </ul>
+ </div>
+ <div id="bodyContent">
+ <div id="content">
+
+ <div class="description">
+ <p>
+Generates random address information.
+</p>
+
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Methods</div>
+ <dl class="methods">
+
+ <dt>C</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000028">city</a>,</li>
+
+ <li><a href="#M000036">country</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>P</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000035">phone</a>,</li>
+
+ <li><a href="#M000032">province</a>,</li>
+
+ <li><a href="#M000033">province_abbrev</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>S</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000029">state</a>,</li>
+
+ <li><a href="#M000030">state_abbrev</a>,</li>
+
+ <li><a href="#M000027">street_address</a>,</li>
+
+ <li><a href="#M000023">street_name</a>,</li>
+
+ <li><a href="#M000024">street_number</a>,</li>
+
+ <li><a href="#M000025">street_suffix</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>Z</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000034">zip</a></li>
+
+ </ul>
+ </dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Class Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000028">
+
+ <a name="M000028"></a><b>city</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random city out of the &#8216;cities&#8217; dictionary.
+</p>
+<pre>
+ Forgery(:address).city
+ # =&gt; &quot;Anaheim&quot;
+
+ Forgery(:address).city
+ # =&gt; &quot;Sacramento&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L57" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000028_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 57</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">city</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:cities</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000036">
+
+ <a name="M000036"></a><b>country</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random country out of the &#8216;countries&#8217; dictionary.
+</p>
+<pre>
+ Forgery(:address).country
+ # =&gt; &quot;Uruguay&quot;
+
+ Forgery(:address).country
+ # =&gt; &quot;Romania&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L134" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000036_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 134</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">country</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:countries</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000035">
+
+ <a name="M000035"></a><b>phone</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets one of the formats from &#8216;phone_formats&#8217; and converts it to
+numbers.
+</p>
+<pre>
+ Forgery(:address).phone
+ # =&gt; &quot;1-(416)185-8799&quot;
+
+ Forgery(:address).phone
+ # =&gt; &quot;1-(589)248-0418&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L123" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000035_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 123</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">phone</span>
+ <span class="ruby-identifier">formats</span>[<span class="ruby-identifier">:phone</span>].<span class="ruby-identifier">random</span>.<span class="ruby-identifier">to_numbers</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000032">
+
+ <a name="M000032"></a><b>province</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random Canadian province or territory out of the
+&#8216;provinces&#8217; dictionary.
+</p>
+<pre>
+ Forgery(:address).province
+ # =&gt; &quot;Ontario&quot;
+
+ Forgery(:address).province
+ # =&gt; &quot;Northwest Territories&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L90" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000032_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 90</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">province</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:provinces</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000033">
+
+ <a name="M000033"></a><b>province_abbrev</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random Canadian province or territory abbreviation out of the
+&#8216;<a href="Address.html#M000033">province_abbrev</a>&#8217;
+dictionary.
+</p>
+<pre>
+ Forgery(:address).province_abbrev
+ # =&gt; &quot;ON&quot;
+
+ Forgery(:address).province_abbrev
+ # =&gt; &quot;NT&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L101" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000033_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 101</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">province_abbrev</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:province_abbrevs</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000029">
+
+ <a name="M000029"></a><b>state</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random state out of the &#8216;states&#8217; dictionary.
+</p>
+<pre>
+ Forgery(:address).state
+ # =&gt; &quot;Mississippi&quot;
+
+ Forgery(:address).state
+ # =&gt; &quot;Minnesota&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L68" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000029_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 68</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:states</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000030">
+
+ <a name="M000030"></a><b>state_abbrev</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random state abbreviation out of the &#8216;<a
+href="Address.html#M000030">state_abbrev</a>&#8217; dictionary.
+</p>
+<pre>
+ Forgery(:address).state_abbrev
+ # =&gt; &quot;GA&quot;
+
+ Forgery(:address).state_abbrev
+ # =&gt; &quot;TX&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L79" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000030_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 79</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state_abbrev</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:state_abbrevs</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000027">
+
+ <a name="M000027"></a><b>street_address</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a full street address, including street number, street name, and
+street suffix.
+</p>
+<pre>
+ Forgery(:address).street_address
+ # =&gt; &quot;92 West Circle&quot;
+
+ Forgery(:address).street_address
+ # =&gt; &quot;93265 Harper Lane&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L46" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000027_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 46</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_address</span>
+ <span class="ruby-node">&quot;#{street_number} #{street_name} #{street_suffix}&quot;</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000023">
+
+ <a name="M000023"></a><b>street_name</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random street name out of the &#8216;streets&#8217; dictionary.
+</p>
+<pre>
+ Forgery(:address).street_name
+ # =&gt; &quot;Atwood&quot;
+
+ Forgery(:address).street_name
+ # =&gt; &quot;Fordem&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L11" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000023_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 11</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_name</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:streets</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000024">
+
+ <a name="M000024"></a><b>street_number</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets one of the formats from &#8216;street_number_formats&#8217; and
+converts it to numbers.
+</p>
+<pre>
+ Forgery(:address).street_number
+ # =&gt; 1
+
+ Forgery(:address).street_number
+ # =&gt; 1234
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L23" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000024_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 23</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_number</span>
+ <span class="ruby-identifier">formats</span>[<span class="ruby-identifier">:street_number</span>].<span class="ruby-identifier">random</span>.<span class="ruby-identifier">to_numbers</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000025">
+
+ <a name="M000025"></a><b>street_suffix</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random street suffix out of the &#8216;street_suffixes&#8217;
+dictionary.
+</p>
+<pre>
+ Forgery(:address).street_suffix
+ # =&gt; &quot;Street&quot;
+
+ Forgery(:address).street_suffix
+ # =&gt; &quot;Parkway&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L34" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000025_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 34</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_suffix</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:street_suffixes</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000034">
+
+ <a name="M000034"></a><b>zip</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets one of the formats from &#8216;zip_formats&#8217; and converts it to
+numbers.
+</p>
+<pre>
+ Forgery(:address).zip
+ # =&gt; &quot;52474&quot;
+
+ Forgery(:address).zip
+ # =&gt; &quot;66702-4349&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L112" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000034_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 112</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zip</span>
+ <span class="ruby-identifier">formats</span>[<span class="ruby-identifier">:zip</span>].<span class="ruby-identifier">random</span>.<span class="ruby-identifier">to_numbers</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+</div>
+ </div>
+ </body>
+</html>
View
531 classes/Forgery/Basic.html
@@ -0,0 +1,531 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!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>Forgery::Basic</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
+ <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
+</head>
+
+<body>
+ <div class="banner">
+ <h1>
+ <span class="type">Class</span>
+ Forgery::Basic
+
+ <span class="parent">&lt;
+
+ <a href="../Forgery.html">Forgery</a>
+
+ </span>
+
+ </h1>
+ <ul class="files">
+
+ <li><a href="../../files/lib/forgery/forgery/basic_rb.html">lib/forgery/forgery/basic.rb</a></li>
+
+ </ul>
+ </div>
+ <div id="bodyContent">
+ <div id="content">
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Methods</div>
+ <dl class="methods">
+
+ <dt>B</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000037">boolean</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>C</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000038">color</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>E</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000031">encrypt</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>F</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000043">frequency</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>H</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000039">hex_color</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>N</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000041">number</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>P</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000026">password</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>S</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000040">short_hex_color</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>T</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000042">text</a></li>
+
+ </ul>
+ </dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Constants</div>
+ <table border='0' cellpadding='5'>
+
+ <tr valign='top'>
+ <td class="attr-name">HEX_DIGITS</td>
+ <td>=</td>
+ <td class="attr-value">%w{0 1 2 3 4 5 6 7 8 9 a b c d e f}</td>
+ </tr>
+
+
+ <tr valign='top'>
+ <td class="attr-name">UPPER_ALPHA</td>
+ <td>=</td>
+ <td class="attr-value">('A'..'Z').to_a</td>
+ </tr>
+
+
+ <tr valign='top'>
+ <td class="attr-name">LOWER_ALPHA</td>
+ <td>=</td>
+ <td class="attr-value">('a'..'z').to_a</td>
+ </tr>
+
+
+ <tr valign='top'>
+ <td class="attr-name">NUMERIC</td>
+ <td>=</td>
+ <td class="attr-value">('0'..'9').to_a</td>
+ </tr>
+
+
+ <tr valign='top'>
+ <td class="attr-name">SPECIAL_CHARACTERS</td>
+ <td>=</td>
+ <td class="attr-value">%w{! ' @ # $ % ^ &amp; * ( ) _ + - = [ ] { } ; : &quot; , . / ?}</td>
+ </tr>
+
+
+ <tr valign='top'>
+ <td class="attr-name">BOOLEAN</td>
+ <td>=</td>
+ <td class="attr-value">[true, false]</td>
+ </tr>
+
+
+ </table>
+
+
+
+
+
+ <div class="sectiontitle">Class Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000037">
+
+ <a name="M000037"></a><b>boolean</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random boolean value
+</p>
+<pre>
+ Forgery(:basic).boolean
+ # =&gt; true
+
+ Forgery(:basic).boolean
+ # =&gt; false
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L64" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000037_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 64</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">boolean</span>
+ <span class="ruby-constant">BOOLEAN</span>.<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000038">
+
+ <a name="M000038"></a><b>color</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L68" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000038_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 68</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">color</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:colors</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000031">
+
+ <a name="M000031"></a><b>encrypt</b>(password=&quot;password&quot;, salt=Time.now.to_s)
+
+ </div>
+
+ <div class="description">
+ <p>
+SHA1 hexdigests a password salted with the current time
+</p>
+<pre>
+ Forgery(:basic).encrypt
+ # =&gt; &quot;b2fbd3955a36068e93e0b9db45bcb178f08336f5&quot;
+
+ Forgery(:basic).encrypt('your-password')
+ # =&gt; &quot;00932bafce4a9391f888ca77f81f98b8e89d3aa6&quot;
+
+ Forgery(:basic).encrypt('your-password', Time.utc(2009))
+ # =&gt; &quot;4b157c2fbf430b962842d21926eaa887c3a12f81&quot;
+</pre>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L53" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000031_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 53</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">encrypt</span>(<span class="ruby-identifier">password</span>=<span class="ruby-value str">&quot;password&quot;</span>, <span class="ruby-identifier">salt</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_s</span>)
+ <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-node">&quot;--#{salt}--#{password}--&quot;</span>)
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000043">
+
+ <a name="M000043"></a><b>frequency</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L107" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000043_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 107</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">frequency</span>
+ <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:frequencies</span>].<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000039">
+
+ <a name="M000039"></a><b>hex_color</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L72" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000039_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 72</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hex_color</span>
+ <span class="ruby-identifier">hex_digits</span> = (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">6</span>).<span class="ruby-identifier">collect</span> { <span class="ruby-constant">HEX_DIGITS</span>.<span class="ruby-identifier">random</span>}
+ <span class="ruby-node">&quot;##{hex_digits.join}&quot;</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000041">
+
+ <a name="M000041"></a><b>number</b>(options={})
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L81" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000041_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 81</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">number</span>(<span class="ruby-identifier">options</span>={})
+ <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:at_least</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>,
+ <span class="ruby-identifier">:at_most</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
+
+ (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:at_least</span>]<span class="ruby-operator">..</span><span class="ruby-identifier">options</span>[<span class="ruby-identifier">:at_most</span>]).<span class="ruby-identifier">random</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000026">
+
+ <a name="M000026"></a><b>password</b>(options={})
+
+ </div>
+
+ <div class="description">
+ <p>
+Gets a random string for use as a password
+</p>
+<pre>
+ Forgery(:basic).password
+ # =&gt; &quot;1MbyMQhU&quot;
+
+ Forgery(:basic).password(:at_least =&gt; 3, :at_most =&gt; 5)
+ # =&gt; &quot;WbgP&quot;
+</pre>
+<p>
+Supported Options
+</p>
+<dl>
+<dt>:at_least</dt><dd>The minimum length the password may be. Defaults to 6.
+
+</dd>
+<dt>:at_most</dt><dd>The maximum length the password may be. Defaults to 12.
+
+</dd>
+<dt>:allow_lower</dt><dd>Allow lowercase characters. Defaults to true.
+
+</dd>
+<dt>:allow_upper</dt><dd>Allow uppercase characters. Defaults to true.
+
+</dd>
+<dt>:allow_numeric</dt><dd>Allow numbers. Defaults to true.
+
+</dd>
+<dt>:allow_special</dt><dd>Allow special characters. Defaults to false.
+
+</dd>
+</dl>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L33" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000026_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 33</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">password</span>(<span class="ruby-identifier">options</span>={})
+ <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:at_least</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">6</span>,
+ <span class="ruby-identifier">:at_most</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">12</span>,
+ <span class="ruby-identifier">:allow_lower</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>,
+ <span class="ruby-identifier">:allow_upper</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>,
+ <span class="ruby-identifier">:allow_numeric</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>,
+ <span class="ruby-identifier">:allow_special</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">options</span>)
+ <span class="ruby-identifier">text</span>(<span class="ruby-identifier">options</span>)
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000040">
+
+ <a name="M000040"></a><b>short_hex_color</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L77" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000040_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 77</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">short_hex_color</span>
+ <span class="ruby-identifier">hex_color</span>[<span class="ruby-value">0</span>,<span class="ruby-value">4</span>]
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000042">
+
+ <a name="M000042"></a><b>text</b>(options={})
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L88" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000042_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 88</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">text</span>(<span class="ruby-identifier">options</span>={})
+ <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:at_least</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>,
+ <span class="ruby-identifier">:at_most</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">15</span>,
+ <span class="ruby-identifier">:allow_lower</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>,
+ <span class="ruby-identifier">:allow_upper</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>,
+ <span class="ruby-identifier">:allow_numeric</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>,
+ <span class="ruby-identifier">:allow_special</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">options</span>)
+
+ <span class="ruby-identifier">allowed_characters</span> = []
+ <span class="ruby-identifier">allowed_characters</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">LOWER_ALPHA</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:allow_lower</span>]
+ <span class="ruby-identifier">allowed_characters</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">UPPER_ALPHA</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:allow_upper</span>]
+ <span class="ruby-identifier">allowed_characters</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">NUMERIC</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:allow_numeric</span>]
+ <span class="ruby-identifier">allowed_characters</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SPECIAL_CHARACTERS</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:allow_special</span>]
+
+ <span class="ruby-identifier">length</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:at_least</span>]<span class="ruby-operator">..</span><span class="ruby-identifier">options</span>[<span class="ruby-identifier">:at_most</span>]).<span class="ruby-identifier">random</span>
+
+ <span class="ruby-identifier">allowed_characters</span>.<span class="ruby-identifier">random_subset</span>(<span class="ruby-identifier">length</span>).<span class="ruby-identifier">join</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+</div>
+ </div>
+ </body>
+</html>
View
214 classes/Forgery/Dictionaries.html
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!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>Forgery::Dictionaries</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
+ <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
+</head>
+
+<body>
+ <div class="banner">
+ <h1>
+ <span class="type">Class</span>
+ Forgery::Dictionaries
+
+ <span class="parent">&lt;
+
+ <a href="../Object.html">Object</a>
+
+ </span>
+
+ </h1>
+ <ul class="files">
+
+ <li><a href="../../files/lib/forgery/dictionaries_rb.html">lib/forgery/dictionaries.rb</a></li>
+
+ </ul>
+ </div>
+ <div id="bodyContent">
+ <div id="content">
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Methods</div>
+ <dl class="methods">
+
+ <dt>#</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000003">[]</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>L</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000004">loaded?</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>N</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000002">new</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>R</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000005">reset!</a></li>
+
+ </ul>
+ </dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Class Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000002">
+
+ <a name="M000002"></a><b>new</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/dictionaries.rb#L5" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000002_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/dictionaries.rb, line 5</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
+ <span class="ruby-ivar">@dictionaries</span> = {}
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="sectiontitle">Instance Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000003">
+
+ <a name="M000003"></a><b>[]</b>(key)
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/dictionaries.rb#L9" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000003_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/dictionaries.rb, line 9</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
+ <span class="ruby-identifier">symbolized_key</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>
+ <span class="ruby-ivar">@dictionaries</span>[<span class="ruby-identifier">symbolized_key</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">FileReader</span>.<span class="ruby-identifier">read_dictionary</span>(<span class="ruby-identifier">symbolized_key</span>)
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000004">
+
+ <a name="M000004"></a><b>loaded?</b>(key)
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/dictionaries.rb#L14" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000004_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/dictionaries.rb, line 14</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">loaded?</span>(<span class="ruby-identifier">key</span>)
+ <span class="ruby-ivar">@dictionaries</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>)
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000005">
+
+ <a name="M000005"></a><b>reset!</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/dictionaries.rb#L18" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000005_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/dictionaries.rb, line 18</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset!</span>
+ <span class="ruby-ivar">@dictionaries</span> = {}
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+</div>
+ </div>
+ </body>
+</html>
View
436 classes/Forgery/FileReader.html
@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!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>Forgery::FileReader</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
+ <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
+</head>
+
+<body>
+ <div class="banner">
+ <h1>
+ <span class="type">Class</span>
+ Forgery::FileReader
+
+ <span class="parent">&lt;
+
+ <a href="../Object.html">Object</a>
+
+ </span>
+
+ </h1>
+ <ul class="files">
+
+ <li><a href="../../files/lib/forgery/file_reader_rb.html">lib/forgery/file_reader.rb</a></li>
+
+ </ul>
+ </div>
+ <div id="bodyContent">
+ <div id="content">
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Methods</div>
+ <dl class="methods">
+
+ <dt>E</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000021">external_path_to_dictionary</a>,</li>
+
+ <li><a href="#M000017">external_path_to_format</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>I</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000022">internal_path_to_dictionary</a>,</li>
+
+ <li><a href="#M000018">internal_path_to_format</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>P</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000020">path_to_dictionary</a>,</li>
+
+ <li><a href="#M000016">path_to_format</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>R</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000011">read_dictionary</a>,</li>
+
+ <li><a href="#M000013">read_file</a>,</li>
+
+ <li><a href="#M000012">read_format</a></li>
+
+ </ul>
+ </dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Class Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000011">
+
+ <a name="M000011"></a><b>read_dictionary</b>(dictionary)
+
+ </div>
+
+ <div class="description">
+ <p>
+Returns an array of strings containing each line in the dictionary
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/file_reader.rb#L6" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000011_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/file_reader.rb, line 6</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read_dictionary</span>(<span class="ruby-identifier">dictionary</span>)
+ <span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">path_to_dictionary</span>(<span class="ruby-identifier">dictionary</span>))
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000012">
+
+ <a name="M000012"></a><b>read_format</b>(format)
+
+ </div>
+
+ <div class="description">
+ <p>
+Returns an array of strings containing each line in the format
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/file_reader.rb#L11" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000012_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/file_reader.rb, line 11</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read_format</span>(<span class="ruby-identifier">format</span>)
+ <span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">path_to_format</span>(<span class="ruby-identifier">format</span>))
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="sectiontitle">Class Protected methods</div>
+
+ <div class="method">
+ <div class="title" id="M000021">
+
+ <a name="M000021"></a><b>external_path_to_dictionary</b>(dictionary)
+
+ </div>
+
+ <div class="description">
+ <p>
+Returns the path to a dictionary outside of forgery
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/file_reader.rb#L58" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000021_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/file_reader.rb, line 58</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">external_path_to_dictionary</span>(<span class="ruby-identifier">dictionary</span>)
+ <span class="ruby-constant">Forgery</span>.<span class="ruby-identifier">rails_root</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/lib/forgery/dictionaries/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dictionary</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Forgery</span>.<span class="ruby-identifier">rails?</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000017">
+
+ <a name="M000017"></a><b>external_path_to_format</b>(format)
+
+ </div>
+
+ <div class="description">
+ <p>
+Returns the path to a format outside of forgery
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/file_reader.rb#L38" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000017_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/file_reader.rb, line 38</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">external_path_to_format</span>(<span class="ruby-identifier">format</span>)
+ <span class="ruby-constant">Forgery</span>.<span class="ruby-identifier">rails_root</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/lib/forgery/formats/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Forgery</span>.<span class="ruby-identifier">rails?</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000022">
+
+ <a name="M000022"></a><b>internal_path_to_dictionary</b>(dictionary)
+
+ </div>
+
+ <div class="description">
+ <p>
+Returns the path to a dictionary within forgery
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/file_reader.rb#L63" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000022_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/file_reader.rb, line 63</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">internal_path_to_dictionary</span>(<span class="ruby-identifier">dictionary</span>)
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'/dictionaries/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dictionary</span>.<span class="ruby-identifier">to_s</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000018">
+
+ <a name="M000018"></a><b>internal_path_to_format</b>(format)
+
+ </div>
+
+ <div class="description">
+ <p>
+Returns the path to a format inside of forgery
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show</a>
+
+ | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/file_reader.rb#L43" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000018_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/forgery/file_reader.rb, line 43</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">internal_path_to_format</span>(<span class="ruby-identifier">format</span>)
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'/formats/'</span> <