Skip to content
This repository
Browse code

update docs

  • Loading branch information...
commit 37bc093df1416aba0de958367a769f339e7d10ac 1 parent 885fbaf
Nathan Sutton nate authored

Showing 61 changed files with 6,337 additions and 98 deletions. Show diff stats Hide diff stats

  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
30 classes/Array.html
@@ -27,7 +27,7 @@
27 27 </h1>
28 28 <ul class="files">
29 29
30   - <li><a href="../files/lib/extensions/array_rb.html">lib/extensions/array.rb</a></li>
  30 + <li><a href="../files/lib/forgery/extensions/array_rb.html">lib/forgery/extensions/array.rb</a></li>
31 31
32 32 </ul>
33 33 </div>
@@ -49,9 +49,9 @@
49 49 <dd>
50 50 <ul>
51 51
52   - <li><a href="#M000004">random</a>,</li>
  52 + <li><a href="#M000000">random</a>,</li>
53 53
54   - <li><a href="#M000005">random_subset</a></li>
  54 + <li><a href="#M000001">random_subset</a></li>
55 55
56 56 </ul>
57 57 </dd>
@@ -73,9 +73,9 @@
73 73 <div class="sectiontitle">Instance Public methods</div>
74 74
75 75 <div class="method">
76   - <div class="title" id="M000004">
  76 + <div class="title" id="M000000">
77 77
78   - <a name="M000004"></a><b>random</b>()
  78 + <a name="M000000"></a><b>random</b>()
79 79
80 80 </div>
81 81
@@ -84,11 +84,13 @@
84 84
85 85 <div class="sourcecode">
86 86 <p class="source-link">
87   - Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
  87 + Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
  88 +
  89 + | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/extensions/array.rb#L2" target="_blank" class="github_url">on GitHub</a>
88 90
89 91 </p>
90   - <div id="M000004_source" class="dyn-source">
91   - <pre><span class="ruby-comment cmt"># File lib/extensions/array.rb, line 2</span>
  92 + <div id="M000000_source" class="dyn-source">
  93 + <pre><span class="ruby-comment cmt"># File lib/forgery/extensions/array.rb, line 2</span>
92 94 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random</span>
93 95 <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>)]
94 96 <span class="ruby-keyword kw">end</span></pre>
@@ -98,9 +100,9 @@
98 100 </div>
99 101
100 102 <div class="method">
101   - <div class="title" id="M000005">
  103 + <div class="title" id="M000001">
102 104
103   - <a name="M000005"></a><b>random_subset</b>(len=2)
  105 + <a name="M000001"></a><b>random_subset</b>(len=2)
104 106
105 107 </div>
106 108
@@ -109,11 +111,13 @@
109 111
110 112 <div class="sourcecode">
111 113 <p class="source-link">
112   - Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
  114 + Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
  115 +
  116 + | <a href="http://github.com/sevenwire/forgery/blob/c86d042c7164ca70bfa35d0c11503dbe0bd4cf78/lib/forgery/extensions/array.rb#L6" target="_blank" class="github_url">on GitHub</a>
113 117
114 118 </p>
115   - <div id="M000005_source" class="dyn-source">
116   - <pre><span class="ruby-comment cmt"># File lib/extensions/array.rb, line 6</span>
  119 + <div id="M000001_source" class="dyn-source">
  120 + <pre><span class="ruby-comment cmt"># File lib/forgery/extensions/array.rb, line 6</span>
117 121 <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>)
118 122 <span class="ruby-identifier">rs</span> = []
119 123 <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> }
124 classes/Forgery.html
@@ -27,7 +27,15 @@
27 27 </h1>
28 28 <ul class="files">
29 29
30   - <li><a href="../files/lib/forgery_rb.html">lib/forgery.rb</a></li>
  30 + <li><a href="../files/lib/forgery/dictionaries_rb.html">lib/forgery/dictionaries.rb</a></li>
  31 +
  32 + <li><a href="../files/lib/forgery/file_reader_rb.html">lib/forgery/file_reader.rb</a></li>
  33 +
  34 + <li><a href="../files/lib/forgery/forgery_rb.html">lib/forgery/forgery.rb</a></li>
  35 +
  36 + <li><a href="../files/lib/forgery/formats_rb.html">lib/forgery/formats.rb</a></li>
  37 +
  38 + <li><a href="../files/lib/forgery/version_rb.html">lib/forgery/version.rb</a></li>
31 39
32 40 </ul>
33 41 </div>
@@ -63,6 +71,17 @@
63 71 </ul>
64 72 </dd>
65 73
  74 + <dt>R</dt>
  75 + <dd>
  76 + <ul>
  77 +
  78 + <li><a href="#M000078">rails?</a>,</li>
  79 +
  80 + <li><a href="#M000077">rails_root</a></li>
  81 +
  82 + </ul>
  83 + </dd>
  84 +
66 85 </dl>
67 86
68 87
@@ -71,8 +90,45 @@
71 90
72 91
73 92
  93 + <div class="sectiontitle">Classes and Modules</div>
  94 + <ul>
  95 +
  96 + <li><span class="type">CLASS</span> <a href="Forgery/Address.html">Forgery::Address</a></li>
  97 +
  98 + <li><span class="type">CLASS</span> <a href="Forgery/Basic.html">Forgery::Basic</a></li>
  99 +
  100 + <li><span class="type">CLASS</span> <a href="Forgery/Dictionaries.html">Forgery::Dictionaries</a></li>
  101 +
  102 + <li><span class="type">CLASS</span> <a href="Forgery/FileReader.html">Forgery::FileReader</a></li>
  103 +
  104 + <li><span class="type">CLASS</span> <a href="Forgery/Formats.html">Forgery::Formats</a></li>
  105 +
  106 + <li><span class="type">CLASS</span> <a href="Forgery/Internet.html">Forgery::Internet</a></li>
  107 +
  108 + <li><span class="type">CLASS</span> <a href="Forgery/LoremIpsum.html">Forgery::LoremIpsum</a></li>
  109 +
  110 + <li><span class="type">CLASS</span> <a href="Forgery/Monetary.html">Forgery::Monetary</a></li>
  111 +
  112 + <li><span class="type">CLASS</span> <a href="Forgery/Name.html">Forgery::Name</a></li>
  113 +
  114 + <li><span class="type">CLASS</span> <a href="Forgery/Personal.html">Forgery::Personal</a></li>
  115 +
  116 + </ul>
  117 +
74 118
75 119
  120 + <div class="sectiontitle">Constants</div>
  121 + <table border='0' cellpadding='5'>
  122 +
  123 + <tr valign='top'>
  124 + <td class="attr-name">VERSION</td>
  125 + <td>=</td>
  126 + <td class="attr-value">&quot;0.3.1&quot;</td>
  127 + </tr>
  128 +
  129 +
  130 + </table>
  131 +
76 132
77 133
78 134
@@ -93,9 +149,11 @@
93 149 <p class="source-link">
94 150 Source: <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">show</a>
95 151
  152 + | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L3" target="_blank" class="github_url">on GitHub</a>
  153 +
96 154 </p>
97 155 <div id="M000075_source" class="dyn-source">
98   - <pre><span class="ruby-comment cmt"># File lib/forgery.rb, line 16</span>
  156 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 3</span>
99 157 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dictionaries</span>
100 158 <span class="ruby-ivar">@@dictionaries</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Dictionaries</span>.<span class="ruby-identifier">new</span>
101 159 <span class="ruby-keyword kw">end</span></pre>
@@ -118,9 +176,11 @@
118 176 <p class="source-link">
119 177 Source: <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">show</a>
120 178
  179 + | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L7" target="_blank" class="github_url">on GitHub</a>
  180 +
121 181 </p>
122 182 <div id="M000076_source" class="dyn-source">
123   - <pre><span class="ruby-comment cmt"># File lib/forgery.rb, line 20</span>
  183 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 7</span>
124 184 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">formats</span>
125 185 <span class="ruby-ivar">@@formats</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Formats</span>.<span class="ruby-identifier">new</span>
126 186 <span class="ruby-keyword kw">end</span></pre>
@@ -129,6 +189,64 @@
129 189
130 190 </div>
131 191
  192 + <div class="method">
  193 + <div class="title" id="M000078">
  194 +
  195 + <a name="M000078"></a><b>rails?</b>()
  196 +
  197 + </div>
  198 +
  199 +
  200 +
  201 +
  202 + <div class="sourcecode">
  203 + <p class="source-link">
  204 + Source: <a href="javascript:toggleSource('M000078_source')" id="l_M000078_source">show</a>
  205 +
  206 + | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L19" target="_blank" class="github_url">on GitHub</a>
  207 +
  208 + </p>
  209 + <div id="M000078_source" class="dyn-source">
  210 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 19</span>
  211 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rails?</span>
  212 + <span class="ruby-operator">!</span><span class="ruby-identifier">rails_root</span>.<span class="ruby-identifier">nil?</span>
  213 + <span class="ruby-keyword kw">end</span></pre>
  214 + </div>
  215 + </div>
  216 +
  217 + </div>
  218 +
  219 + <div class="method">
  220 + <div class="title" id="M000077">
  221 +
  222 + <a name="M000077"></a><b>rails_root</b>()
  223 +
  224 + </div>
  225 +
  226 +
  227 +
  228 +
  229 + <div class="sourcecode">
  230 + <p class="source-link">
  231 + Source: <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">show</a>
  232 +
  233 + | <a href="http://github.com/sevenwire/forgery/blob/f6d209abfe2176ef633aa16823c6e84c2385ae40/lib/forgery/forgery.rb#L11" target="_blank" class="github_url">on GitHub</a>
  234 +
  235 + </p>
  236 + <div id="M000077_source" class="dyn-source">
  237 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery.rb, line 11</span>
  238 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rails_root</span>
  239 + <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Rails</span>)
  240 + <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">to_s</span>
  241 + <span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RAILS_ROOT</span>)
  242 + <span class="ruby-constant">RAILS_ROOT</span>
  243 + <span class="ruby-keyword kw">end</span>
  244 + <span class="ruby-keyword kw">end</span></pre>
  245 + </div>
  246 + </div>
  247 +
  248 + </div>
  249 +
132 250 </div>
133 251 </div>
134 252 </body>
627 classes/Forgery/Address.html
... ... @@ -0,0 +1,627 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5 +<head>
  6 + <title>Forgery::Address</title>
  7 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8 + <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
  9 + <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
  10 + <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
  11 + <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
  12 + <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
  13 +</head>
  14 +
  15 +<body>
  16 + <div class="banner">
  17 + <h1>
  18 + <span class="type">Class</span>
  19 + Forgery::Address
  20 +
  21 + <span class="parent">&lt;
  22 +
  23 + <a href="../Forgery.html">Forgery</a>
  24 +
  25 + </span>
  26 +
  27 + </h1>
  28 + <ul class="files">
  29 +
  30 + <li><a href="../../files/lib/forgery/forgery/address_rb.html">lib/forgery/forgery/address.rb</a></li>
  31 +
  32 + </ul>
  33 + </div>
  34 + <div id="bodyContent">
  35 + <div id="content">
  36 +
  37 + <div class="description">
  38 + <p>
  39 +Generates random address information.
  40 +</p>
  41 +
  42 + </div>
  43 +
  44 +
  45 +
  46 +
  47 +
  48 +
  49 +
  50 +
  51 +
  52 + <div class="sectiontitle">Methods</div>
  53 + <dl class="methods">
  54 +
  55 + <dt>C</dt>
  56 + <dd>
  57 + <ul>
  58 +
  59 + <li><a href="#M000028">city</a>,</li>
  60 +
  61 + <li><a href="#M000036">country</a></li>
  62 +
  63 + </ul>
  64 + </dd>
  65 +
  66 + <dt>P</dt>
  67 + <dd>
  68 + <ul>
  69 +
  70 + <li><a href="#M000035">phone</a>,</li>
  71 +
  72 + <li><a href="#M000032">province</a>,</li>
  73 +
  74 + <li><a href="#M000033">province_abbrev</a></li>
  75 +
  76 + </ul>
  77 + </dd>
  78 +
  79 + <dt>S</dt>
  80 + <dd>
  81 + <ul>
  82 +
  83 + <li><a href="#M000029">state</a>,</li>
  84 +
  85 + <li><a href="#M000030">state_abbrev</a>,</li>
  86 +
  87 + <li><a href="#M000027">street_address</a>,</li>
  88 +
  89 + <li><a href="#M000023">street_name</a>,</li>
  90 +
  91 + <li><a href="#M000024">street_number</a>,</li>
  92 +
  93 + <li><a href="#M000025">street_suffix</a></li>
  94 +
  95 + </ul>
  96 + </dd>
  97 +
  98 + <dt>Z</dt>
  99 + <dd>
  100 + <ul>
  101 +
  102 + <li><a href="#M000034">zip</a></li>
  103 +
  104 + </ul>
  105 + </dd>
  106 +
  107 + </dl>
  108 +
  109 +
  110 +
  111 +
  112 +
  113 +
  114 +
  115 +
  116 +
  117 +
  118 +
  119 +
  120 +
  121 + <div class="sectiontitle">Class Public methods</div>
  122 +
  123 + <div class="method">
  124 + <div class="title" id="M000028">
  125 +
  126 + <a name="M000028"></a><b>city</b>()
  127 +
  128 + </div>
  129 +
  130 + <div class="description">
  131 + <p>
  132 +Gets a random city out of the &#8216;cities&#8217; dictionary.
  133 +</p>
  134 +<pre>
  135 + Forgery(:address).city
  136 + # =&gt; &quot;Anaheim&quot;
  137 +
  138 + Forgery(:address).city
  139 + # =&gt; &quot;Sacramento&quot;
  140 +</pre>
  141 +
  142 + </div>
  143 +
  144 +
  145 +
  146 +
  147 + <div class="sourcecode">
  148 + <p class="source-link">
  149 + Source: <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show</a>
  150 +
  151 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L57" target="_blank" class="github_url">on GitHub</a>
  152 +
  153 + </p>
  154 + <div id="M000028_source" class="dyn-source">
  155 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 57</span>
  156 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">city</span>
  157 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:cities</span>].<span class="ruby-identifier">random</span>
  158 + <span class="ruby-keyword kw">end</span></pre>
  159 + </div>
  160 + </div>
  161 +
  162 + </div>
  163 +
  164 + <div class="method">
  165 + <div class="title" id="M000036">
  166 +
  167 + <a name="M000036"></a><b>country</b>()
  168 +
  169 + </div>
  170 +
  171 + <div class="description">
  172 + <p>
  173 +Gets a random country out of the &#8216;countries&#8217; dictionary.
  174 +</p>
  175 +<pre>
  176 + Forgery(:address).country
  177 + # =&gt; &quot;Uruguay&quot;
  178 +
  179 + Forgery(:address).country
  180 + # =&gt; &quot;Romania&quot;
  181 +</pre>
  182 +
  183 + </div>
  184 +
  185 +
  186 +
  187 +
  188 + <div class="sourcecode">
  189 + <p class="source-link">
  190 + Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
  191 +
  192 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L134" target="_blank" class="github_url">on GitHub</a>
  193 +
  194 + </p>
  195 + <div id="M000036_source" class="dyn-source">
  196 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 134</span>
  197 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">country</span>
  198 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:countries</span>].<span class="ruby-identifier">random</span>
  199 + <span class="ruby-keyword kw">end</span></pre>
  200 + </div>
  201 + </div>
  202 +
  203 + </div>
  204 +
  205 + <div class="method">
  206 + <div class="title" id="M000035">
  207 +
  208 + <a name="M000035"></a><b>phone</b>()
  209 +
  210 + </div>
  211 +
  212 + <div class="description">
  213 + <p>
  214 +Gets one of the formats from &#8216;phone_formats&#8217; and converts it to
  215 +numbers.
  216 +</p>
  217 +<pre>
  218 + Forgery(:address).phone
  219 + # =&gt; &quot;1-(416)185-8799&quot;
  220 +
  221 + Forgery(:address).phone
  222 + # =&gt; &quot;1-(589)248-0418&quot;
  223 +</pre>
  224 +
  225 + </div>
  226 +
  227 +
  228 +
  229 +
  230 + <div class="sourcecode">
  231 + <p class="source-link">
  232 + Source: <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show</a>
  233 +
  234 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L123" target="_blank" class="github_url">on GitHub</a>
  235 +
  236 + </p>
  237 + <div id="M000035_source" class="dyn-source">
  238 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 123</span>
  239 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">phone</span>
  240 + <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>
  241 + <span class="ruby-keyword kw">end</span></pre>
  242 + </div>
  243 + </div>
  244 +
  245 + </div>
  246 +
  247 + <div class="method">
  248 + <div class="title" id="M000032">
  249 +
  250 + <a name="M000032"></a><b>province</b>()
  251 +
  252 + </div>
  253 +
  254 + <div class="description">
  255 + <p>
  256 +Gets a random Canadian province or territory out of the
  257 +&#8216;provinces&#8217; dictionary.
  258 +</p>
  259 +<pre>
  260 + Forgery(:address).province
  261 + # =&gt; &quot;Ontario&quot;
  262 +
  263 + Forgery(:address).province
  264 + # =&gt; &quot;Northwest Territories&quot;
  265 +</pre>
  266 +
  267 + </div>
  268 +
  269 +
  270 +
  271 +
  272 + <div class="sourcecode">
  273 + <p class="source-link">
  274 + Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
  275 +
  276 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L90" target="_blank" class="github_url">on GitHub</a>
  277 +
  278 + </p>
  279 + <div id="M000032_source" class="dyn-source">
  280 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 90</span>
  281 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">province</span>
  282 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:provinces</span>].<span class="ruby-identifier">random</span>
  283 + <span class="ruby-keyword kw">end</span></pre>
  284 + </div>
  285 + </div>
  286 +
  287 + </div>
  288 +
  289 + <div class="method">
  290 + <div class="title" id="M000033">
  291 +
  292 + <a name="M000033"></a><b>province_abbrev</b>()
  293 +
  294 + </div>
  295 +
  296 + <div class="description">
  297 + <p>
  298 +Gets a random Canadian province or territory abbreviation out of the
  299 +&#8216;<a href="Address.html#M000033">province_abbrev</a>&#8217;
  300 +dictionary.
  301 +</p>
  302 +<pre>
  303 + Forgery(:address).province_abbrev
  304 + # =&gt; &quot;ON&quot;
  305 +
  306 + Forgery(:address).province_abbrev
  307 + # =&gt; &quot;NT&quot;
  308 +</pre>
  309 +
  310 + </div>
  311 +
  312 +
  313 +
  314 +
  315 + <div class="sourcecode">
  316 + <p class="source-link">
  317 + Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
  318 +
  319 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L101" target="_blank" class="github_url">on GitHub</a>
  320 +
  321 + </p>
  322 + <div id="M000033_source" class="dyn-source">
  323 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 101</span>
  324 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">province_abbrev</span>
  325 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:province_abbrevs</span>].<span class="ruby-identifier">random</span>
  326 + <span class="ruby-keyword kw">end</span></pre>
  327 + </div>
  328 + </div>
  329 +
  330 + </div>
  331 +
  332 + <div class="method">
  333 + <div class="title" id="M000029">
  334 +
  335 + <a name="M000029"></a><b>state</b>()
  336 +
  337 + </div>
  338 +
  339 + <div class="description">
  340 + <p>
  341 +Gets a random state out of the &#8216;states&#8217; dictionary.
  342 +</p>
  343 +<pre>
  344 + Forgery(:address).state
  345 + # =&gt; &quot;Mississippi&quot;
  346 +
  347 + Forgery(:address).state
  348 + # =&gt; &quot;Minnesota&quot;
  349 +</pre>
  350 +
  351 + </div>
  352 +
  353 +
  354 +
  355 +
  356 + <div class="sourcecode">
  357 + <p class="source-link">
  358 + Source: <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show</a>
  359 +
  360 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L68" target="_blank" class="github_url">on GitHub</a>
  361 +
  362 + </p>
  363 + <div id="M000029_source" class="dyn-source">
  364 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 68</span>
  365 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state</span>
  366 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:states</span>].<span class="ruby-identifier">random</span>
  367 + <span class="ruby-keyword kw">end</span></pre>
  368 + </div>
  369 + </div>
  370 +
  371 + </div>
  372 +
  373 + <div class="method">
  374 + <div class="title" id="M000030">
  375 +
  376 + <a name="M000030"></a><b>state_abbrev</b>()
  377 +
  378 + </div>
  379 +
  380 + <div class="description">
  381 + <p>
  382 +Gets a random state abbreviation out of the &#8216;<a
  383 +href="Address.html#M000030">state_abbrev</a>&#8217; dictionary.
  384 +</p>
  385 +<pre>
  386 + Forgery(:address).state_abbrev
  387 + # =&gt; &quot;GA&quot;
  388 +
  389 + Forgery(:address).state_abbrev
  390 + # =&gt; &quot;TX&quot;
  391 +</pre>
  392 +
  393 + </div>
  394 +
  395 +
  396 +
  397 +
  398 + <div class="sourcecode">
  399 + <p class="source-link">
  400 + Source: <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show</a>
  401 +
  402 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L79" target="_blank" class="github_url">on GitHub</a>
  403 +
  404 + </p>
  405 + <div id="M000030_source" class="dyn-source">
  406 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 79</span>
  407 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state_abbrev</span>
  408 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:state_abbrevs</span>].<span class="ruby-identifier">random</span>
  409 + <span class="ruby-keyword kw">end</span></pre>
  410 + </div>
  411 + </div>
  412 +
  413 + </div>
  414 +
  415 + <div class="method">
  416 + <div class="title" id="M000027">
  417 +
  418 + <a name="M000027"></a><b>street_address</b>()
  419 +
  420 + </div>
  421 +
  422 + <div class="description">
  423 + <p>
  424 +Gets a full street address, including street number, street name, and
  425 +street suffix.
  426 +</p>
  427 +<pre>
  428 + Forgery(:address).street_address
  429 + # =&gt; &quot;92 West Circle&quot;
  430 +
  431 + Forgery(:address).street_address
  432 + # =&gt; &quot;93265 Harper Lane&quot;
  433 +</pre>
  434 +
  435 + </div>
  436 +
  437 +
  438 +
  439 +
  440 + <div class="sourcecode">
  441 + <p class="source-link">
  442 + Source: <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show</a>
  443 +
  444 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L46" target="_blank" class="github_url">on GitHub</a>
  445 +
  446 + </p>
  447 + <div id="M000027_source" class="dyn-source">
  448 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 46</span>
  449 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_address</span>
  450 + <span class="ruby-node">&quot;#{street_number} #{street_name} #{street_suffix}&quot;</span>
  451 + <span class="ruby-keyword kw">end</span></pre>
  452 + </div>
  453 + </div>
  454 +
  455 + </div>
  456 +
  457 + <div class="method">
  458 + <div class="title" id="M000023">
  459 +
  460 + <a name="M000023"></a><b>street_name</b>()
  461 +
  462 + </div>
  463 +
  464 + <div class="description">
  465 + <p>
  466 +Gets a random street name out of the &#8216;streets&#8217; dictionary.
  467 +</p>
  468 +<pre>
  469 + Forgery(:address).street_name
  470 + # =&gt; &quot;Atwood&quot;
  471 +
  472 + Forgery(:address).street_name
  473 + # =&gt; &quot;Fordem&quot;
  474 +</pre>
  475 +
  476 + </div>
  477 +
  478 +
  479 +
  480 +
  481 + <div class="sourcecode">
  482 + <p class="source-link">
  483 + Source: <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show</a>
  484 +
  485 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L11" target="_blank" class="github_url">on GitHub</a>
  486 +
  487 + </p>
  488 + <div id="M000023_source" class="dyn-source">
  489 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 11</span>
  490 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_name</span>
  491 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:streets</span>].<span class="ruby-identifier">random</span>
  492 + <span class="ruby-keyword kw">end</span></pre>
  493 + </div>
  494 + </div>
  495 +
  496 + </div>
  497 +
  498 + <div class="method">
  499 + <div class="title" id="M000024">
  500 +
  501 + <a name="M000024"></a><b>street_number</b>()
  502 +
  503 + </div>
  504 +
  505 + <div class="description">
  506 + <p>
  507 +Gets one of the formats from &#8216;street_number_formats&#8217; and
  508 +converts it to numbers.
  509 +</p>
  510 +<pre>
  511 + Forgery(:address).street_number
  512 + # =&gt; 1
  513 +
  514 + Forgery(:address).street_number
  515 + # =&gt; 1234
  516 +</pre>
  517 +
  518 + </div>
  519 +
  520 +
  521 +
  522 +
  523 + <div class="sourcecode">
  524 + <p class="source-link">
  525 + Source: <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show</a>
  526 +
  527 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L23" target="_blank" class="github_url">on GitHub</a>
  528 +
  529 + </p>
  530 + <div id="M000024_source" class="dyn-source">
  531 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 23</span>
  532 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_number</span>
  533 + <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>
  534 + <span class="ruby-keyword kw">end</span></pre>
  535 + </div>
  536 + </div>
  537 +
  538 + </div>
  539 +
  540 + <div class="method">
  541 + <div class="title" id="M000025">
  542 +
  543 + <a name="M000025"></a><b>street_suffix</b>()
  544 +
  545 + </div>
  546 +
  547 + <div class="description">
  548 + <p>
  549 +Gets a random street suffix out of the &#8216;street_suffixes&#8217;
  550 +dictionary.
  551 +</p>
  552 +<pre>
  553 + Forgery(:address).street_suffix
  554 + # =&gt; &quot;Street&quot;
  555 +
  556 + Forgery(:address).street_suffix
  557 + # =&gt; &quot;Parkway&quot;
  558 +</pre>
  559 +
  560 + </div>
  561 +
  562 +
  563 +
  564 +
  565 + <div class="sourcecode">
  566 + <p class="source-link">
  567 + Source: <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show</a>
  568 +
  569 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L34" target="_blank" class="github_url">on GitHub</a>
  570 +
  571 + </p>
  572 + <div id="M000025_source" class="dyn-source">
  573 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 34</span>
  574 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">street_suffix</span>
  575 + <span class="ruby-identifier">dictionaries</span>[<span class="ruby-identifier">:street_suffixes</span>].<span class="ruby-identifier">random</span>
  576 + <span class="ruby-keyword kw">end</span></pre>
  577 + </div>
  578 + </div>
  579 +
  580 + </div>
  581 +
  582 + <div class="method">
  583 + <div class="title" id="M000034">
  584 +
  585 + <a name="M000034"></a><b>zip</b>()
  586 +
  587 + </div>
  588 +
  589 + <div class="description">
  590 + <p>
  591 +Gets one of the formats from &#8216;zip_formats&#8217; and converts it to
  592 +numbers.
  593 +</p>
  594 +<pre>
  595 + Forgery(:address).zip
  596 + # =&gt; &quot;52474&quot;
  597 +
  598 + Forgery(:address).zip
  599 + # =&gt; &quot;66702-4349&quot;
  600 +</pre>
  601 +
  602 + </div>
  603 +
  604 +
  605 +
  606 +
  607 + <div class="sourcecode">
  608 + <p class="source-link">
  609 + Source: <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show</a>
  610 +
  611 + | <a href="http://github.com/sevenwire/forgery/blob/529b77047c97b5f28dc950a36823bbe05e791bc3/lib/forgery/forgery/address.rb#L112" target="_blank" class="github_url">on GitHub</a>
  612 +
  613 + </p>
  614 + <div id="M000034_source" class="dyn-source">
  615 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/address.rb, line 112</span>
  616 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zip</span>
  617 + <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>
  618 + <span class="ruby-keyword kw">end</span></pre>
  619 + </div>
  620 + </div>
  621 +
  622 + </div>
  623 +
  624 +</div>
  625 + </div>
  626 + </body>
  627 +</html>
531 classes/Forgery/Basic.html
... ... @@ -0,0 +1,531 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5 +<head>
  6 + <title>Forgery::Basic</title>
  7 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8 + <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
  9 + <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
  10 + <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
  11 + <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
  12 + <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
  13 +</head>
  14 +
  15 +<body>
  16 + <div class="banner">
  17 + <h1>
  18 + <span class="type">Class</span>
  19 + Forgery::Basic
  20 +
  21 + <span class="parent">&lt;
  22 +
  23 + <a href="../Forgery.html">Forgery</a>
  24 +
  25 + </span>
  26 +
  27 + </h1>
  28 + <ul class="files">
  29 +
  30 + <li><a href="../../files/lib/forgery/forgery/basic_rb.html">lib/forgery/forgery/basic.rb</a></li>
  31 +
  32 + </ul>
  33 + </div>
  34 + <div id="bodyContent">
  35 + <div id="content">
  36 +
  37 +
  38 +
  39 +
  40 +
  41 +
  42 +
  43 +
  44 +
  45 + <div class="sectiontitle">Methods</div>
  46 + <dl class="methods">
  47 +
  48 + <dt>B</dt>
  49 + <dd>
  50 + <ul>
  51 +
  52 + <li><a href="#M000037">boolean</a></li>
  53 +
  54 + </ul>
  55 + </dd>
  56 +
  57 + <dt>C</dt>
  58 + <dd>
  59 + <ul>
  60 +
  61 + <li><a href="#M000038">color</a></li>
  62 +
  63 + </ul>
  64 + </dd>
  65 +
  66 + <dt>E</dt>
  67 + <dd>
  68 + <ul>
  69 +
  70 + <li><a href="#M000031">encrypt</a></li>
  71 +
  72 + </ul>
  73 + </dd>
  74 +
  75 + <dt>F</dt>
  76 + <dd>
  77 + <ul>
  78 +
  79 + <li><a href="#M000043">frequency</a></li>
  80 +
  81 + </ul>
  82 + </dd>
  83 +
  84 + <dt>H</dt>
  85 + <dd>
  86 + <ul>
  87 +
  88 + <li><a href="#M000039">hex_color</a></li>
  89 +
  90 + </ul>
  91 + </dd>
  92 +
  93 + <dt>N</dt>
  94 + <dd>
  95 + <ul>
  96 +
  97 + <li><a href="#M000041">number</a></li>
  98 +
  99 + </ul>
  100 + </dd>
  101 +
  102 + <dt>P</dt>
  103 + <dd>
  104 + <ul>
  105 +
  106 + <li><a href="#M000026">password</a></li>
  107 +
  108 + </ul>
  109 + </dd>
  110 +
  111 + <dt>S</dt>
  112 + <dd>
  113 + <ul>
  114 +
  115 + <li><a href="#M000040">short_hex_color</a></li>
  116 +
  117 + </ul>
  118 + </dd>
  119 +
  120 + <dt>T</dt>
  121 + <dd>
  122 + <ul>
  123 +
  124 + <li><a href="#M000042">text</a></li>
  125 +
  126 + </ul>
  127 + </dd>
  128 +
  129 + </dl>
  130 +
  131 +
  132 +
  133 +
  134 +
  135 +
  136 +
  137 +
  138 +
  139 + <div class="sectiontitle">Constants</div>
  140 + <table border='0' cellpadding='5'>
  141 +
  142 + <tr valign='top'>
  143 + <td class="attr-name">HEX_DIGITS</td>
  144 + <td>=</td>
  145 + <td class="attr-value">%w{0 1 2 3 4 5 6 7 8 9 a b c d e f}</td>
  146 + </tr>
  147 +
  148 +
  149 + <tr valign='top'>
  150 + <td class="attr-name">UPPER_ALPHA</td>
  151 + <td>=</td>
  152 + <td class="attr-value">('A'..'Z').to_a</td>
  153 + </tr>
  154 +
  155 +
  156 + <tr valign='top'>
  157 + <td class="attr-name">LOWER_ALPHA</td>
  158 + <td>=</td>
  159 + <td class="attr-value">('a'..'z').to_a</td>
  160 + </tr>
  161 +
  162 +
  163 + <tr valign='top'>
  164 + <td class="attr-name">NUMERIC</td>
  165 + <td>=</td>
  166 + <td class="attr-value">('0'..'9').to_a</td>
  167 + </tr>
  168 +
  169 +
  170 + <tr valign='top'>
  171 + <td class="attr-name">SPECIAL_CHARACTERS</td>
  172 + <td>=</td>
  173 + <td class="attr-value">%w{! ' @ # $ % ^ &amp; * ( ) _ + - = [ ] { } ; : &quot; , . / ?}</td>
  174 + </tr>
  175 +
  176 +
  177 + <tr valign='top'>
  178 + <td class="attr-name">BOOLEAN</td>
  179 + <td>=</td>
  180 + <td class="attr-value">[true, false]</td>
  181 + </tr>
  182 +
  183 +
  184 + </table>
  185 +
  186 +
  187 +
  188 +
  189 +
  190 + <div class="sectiontitle">Class Public methods</div>
  191 +
  192 + <div class="method">
  193 + <div class="title" id="M000037">
  194 +
  195 + <a name="M000037"></a><b>boolean</b>()
  196 +
  197 + </div>
  198 +
  199 + <div class="description">
  200 + <p>
  201 +Gets a random boolean value
  202 +</p>
  203 +<pre>
  204 + Forgery(:basic).boolean
  205 + # =&gt; true
  206 +
  207 + Forgery(:basic).boolean
  208 + # =&gt; false
  209 +</pre>
  210 +
  211 + </div>
  212 +
  213 +
  214 +
  215 +
  216 + <div class="sourcecode">
  217 + <p class="source-link">
  218 + Source: <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show</a>
  219 +
  220 + | <a href="http://github.com/sevenwire/forgery/blob/564218834411ff4ebe2bd2e715b6cb37332e1b35/lib/forgery/forgery/basic.rb#L64" target="_blank" class="github_url">on GitHub</a>
  221 +
  222 + </p>
  223 + <div id="M000037_source" class="dyn-source">
  224 + <pre><span class="ruby-comment cmt"># File lib/forgery/forgery/basic.rb, line 64</span>
  225 + <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">boolean</span>
  226 + <span class="ruby-constant">BOOLEAN</span>.<span class="ruby-identifier">random</span>
  227 + <span class="ruby-keyword kw">end</span></pre>
  228 + </div>
  229 + </div>
  230 +
  231 + </div>
  232 +
  233 + <div class="method">
  234 + <div class="title" id="M000038">
  235 +
  236 + <a name="M000038"></a><b>color</b>()
  237 +
  238 + </div>
  239 +
  240 +
  241 +
  242 +
  243 + <div class="sourcecode">
  244 + <p class="source-link">
  245 + Source: <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show</a>