blabla 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,257 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: BlaBla::Util
8
+
9
+ &mdash; Documentação da Gem BlaBla
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (U)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../BlaBla.html" title="BlaBla (module)">BlaBla</a></span></span>
36
+ &raquo;
37
+ <span class="title">Util</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: BlaBla::Util
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">BlaBla::Util</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/utilities/util.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Class Method Summary
112
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#diff_in_years_from-class_method" title="diff_in_years_from (class method)">+ (Object) <strong>diff_in_years_from</strong>(date, date_b = Date.today) </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'></div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#sortear_por_peso-class_method" title="sortear_por_peso (class method)">+ (Object) <strong>sortear_por_peso</strong>(params) </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'></div></span>
157
+
158
+ </li>
159
+
160
+
161
+ </ul>
162
+
163
+
164
+
165
+
166
+ <div id="class_method_details" class="method_details_list">
167
+ <h2>Class Method Details</h2>
168
+
169
+
170
+ <div class="method_details first">
171
+ <h3 class="signature first" id="diff_in_years_from-class_method">
172
+
173
+ + (<tt>Object</tt>) <strong>diff_in_years_from</strong>(date, date_b = Date.today)
174
+
175
+
176
+
177
+
178
+
179
+ </h3><table class="source_code">
180
+ <tr>
181
+ <td>
182
+ <pre class="lines">
183
+
184
+
185
+ 4
186
+ 5
187
+ 6
188
+ 7</pre>
189
+ </td>
190
+ <td>
191
+ <pre class="code"><span class="info file"># File 'lib/utilities/util.rb', line 4</span>
192
+
193
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_diff_in_years_from'>diff_in_years_from</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='comma'>,</span> <span class='id identifier rubyid_date_b'>date_b</span><span class='op'>=</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='rparen'>)</span>
194
+ <span class='id identifier rubyid_years'>years</span> <span class='op'>=</span> <span class='id identifier rubyid_date_b'>date_b</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span> <span class='op'>-</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span>
195
+ <span class='id identifier rubyid_date_b'>date_b</span> <span class='op'>&lt;</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_civil'>civil</span><span class='lparen'>(</span><span class='id identifier rubyid_date_b'>date_b</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_day'>day</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_years'>years</span> <span class='op'>-</span> <span class='int'>1</span> <span class='op'>:</span> <span class='id identifier rubyid_years'>years</span>
196
+ <span class='kw'>end</span></pre>
197
+ </td>
198
+ </tr>
199
+ </table>
200
+ </div>
201
+
202
+ <div class="method_details ">
203
+ <h3 class="signature " id="sortear_por_peso-class_method">
204
+
205
+ + (<tt>Object</tt>) <strong>sortear_por_peso</strong>(params)
206
+
207
+
208
+
209
+
210
+
211
+ </h3><table class="source_code">
212
+ <tr>
213
+ <td>
214
+ <pre class="lines">
215
+
216
+
217
+ 9
218
+ 10
219
+ 11
220
+ 12
221
+ 13
222
+ 14
223
+ 15
224
+ 16
225
+ 17
226
+ 18</pre>
227
+ </td>
228
+ <td>
229
+ <pre class="code"><span class="info file"># File 'lib/utilities/util.rb', line 9</span>
230
+
231
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_sortear_por_peso'>sortear_por_peso</span> <span class='id identifier rubyid_params'>params</span>
232
+ <span class='id identifier rubyid_total_pesos'>total_pesos</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_par'>par</span><span class='op'>|</span> <span class='id identifier rubyid_par'>par</span><span class='lbracket'>[</span><span class='symbol'>:probabilidade</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>+</span><span class='id identifier rubyid_b'>b</span><span class='rbrace'>}</span>
233
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Somatório de pesos deve ser igual a 100</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_total_pesos'>total_pesos</span> <span class='op'>!=</span> <span class='int'>100</span>
234
+
235
+ <span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='int'>1</span>
236
+ <span class='id identifier rubyid_rnd'>rnd</span> <span class='op'>=</span> <span class='id identifier rubyid_rand'>rand</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>100</span>
237
+ <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_par'>par</span><span class='op'>|</span>
238
+ <span class='kw'>return</span> <span class='id identifier rubyid_par'>par</span><span class='lbracket'>[</span><span class='symbol'>:valor</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='const'>Range</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span> <span class='op'>+=</span> <span class='id identifier rubyid_par'>par</span><span class='lbracket'>[</span><span class='symbol'>:probabilidade</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_rnd'>rnd</span>
239
+ <span class='kw'>end</span>
240
+ <span class='kw'>end</span></pre>
241
+ </td>
242
+ </tr>
243
+ </table>
244
+ </div>
245
+
246
+ </div>
247
+
248
+ </div>
249
+
250
+ <div id="footer">
251
+ Generated on Fri Apr 12 09:44:17 2013 by
252
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253
+ 0.8.5.2 (ruby-1.9.3).
254
+ </div>
255
+
256
+ </body>
257
+ </html>
data/doc/_index.html ADDED
@@ -0,0 +1,230 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Documentação da Gem BlaBla
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ hasFrames = window.top.frames.main ? true : false;
17
+ relpath = '';
18
+ framesUrl = "frames.html#!" + escape(window.location.href);
19
+ </script>
20
+
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <div id="header">
30
+ <div id="menu">
31
+
32
+
33
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
34
+ </div>
35
+
36
+ <div id="search">
37
+
38
+ <a class="full_list_link" id="class_list_link"
39
+ href="class_list.html">
40
+ Class List
41
+ </a>
42
+
43
+ <a class="full_list_link" id="method_list_link"
44
+ href="method_list.html">
45
+ Method List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="file_list_link"
49
+ href="file_list.html">
50
+ File List
51
+ </a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1 class="noborder title">Documentação da Gem BlaBla</h1>
60
+ <div id="listing">
61
+ <h1 class="alphaindex">Alphabetic Index</h1>
62
+
63
+ <h2>File Listing</h2>
64
+ <ul id="files" class="index_inline_list">
65
+
66
+
67
+ <li class="r1"><a href="index.html" title="README">README</a></li>
68
+
69
+
70
+ </ul>
71
+
72
+ <div class="clear"></div>
73
+ <h2>Namespace Listing A-Z</h2>
74
+
75
+
76
+ <ul class="toplevel"><li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li></ul>
77
+
78
+
79
+
80
+ <table>
81
+ <tr>
82
+ <td valign='top' width="33%">
83
+
84
+
85
+ <ul id="alpha_B" class="alpha">
86
+ <li class="letter">B</li>
87
+ <ul>
88
+
89
+ <li>
90
+ <span class='object_link'><a href="BlaBla/Bacon.html" title="BlaBla::Bacon (class)">Bacon</a></span>
91
+
92
+ <small>(BlaBla)</small>
93
+
94
+ </li>
95
+
96
+ <li>
97
+ <span class='object_link'><a href="BlaBla/Texto/Base.html" title="BlaBla::Texto::Base (class)">Base</a></span>
98
+
99
+ <small>(BlaBla::Texto)</small>
100
+
101
+ </li>
102
+
103
+ <li>
104
+ <span class='object_link'><a href="BlaBla.html" title="BlaBla (module)">BlaBla</a></span>
105
+
106
+ </li>
107
+
108
+ </ul>
109
+ </ul>
110
+
111
+
112
+ <ul id="alpha_C" class="alpha">
113
+ <li class="letter">C</li>
114
+ <ul>
115
+
116
+ <li>
117
+ <span class='object_link'><a href="BlaBla/CNPJ.html" title="BlaBla::CNPJ (class)">CNPJ</a></span>
118
+
119
+ <small>(BlaBla)</small>
120
+
121
+ </li>
122
+
123
+ <li>
124
+ <span class='object_link'><a href="BlaBla/CPF.html" title="BlaBla::CPF (class)">CPF</a></span>
125
+
126
+ <small>(BlaBla)</small>
127
+
128
+ </li>
129
+
130
+ <li>
131
+ <span class='object_link'><a href="BlaBla/CartaoCredito.html" title="BlaBla::CartaoCredito (class)">CartaoCredito</a></span>
132
+
133
+ <small>(BlaBla)</small>
134
+
135
+ </li>
136
+
137
+ </ul>
138
+ </ul>
139
+
140
+
141
+ <ul id="alpha_I" class="alpha">
142
+ <li class="letter">I</li>
143
+ <ul>
144
+
145
+ <li>
146
+ <span class='object_link'><a href="BlaBla/ISBN.html" title="BlaBla::ISBN (class)">ISBN</a></span>
147
+
148
+ <small>(BlaBla)</small>
149
+
150
+ </li>
151
+
152
+ </ul>
153
+ </ul>
154
+
155
+
156
+ <ul id="alpha_L" class="alpha">
157
+ <li class="letter">L</li>
158
+ <ul>
159
+
160
+ <li>
161
+ <span class='object_link'><a href="BlaBla/Lorem.html" title="BlaBla::Lorem (class)">Lorem</a></span>
162
+
163
+ <small>(BlaBla)</small>
164
+
165
+ </li>
166
+
167
+ </ul>
168
+ </ul>
169
+
170
+
171
+ <ul id="alpha_P" class="alpha">
172
+ <li class="letter">P</li>
173
+ <ul>
174
+
175
+ <li>
176
+ <span class='object_link'><a href="BlaBla/Pessoa.html" title="BlaBla::Pessoa (class)">Pessoa</a></span>
177
+
178
+ <small>(BlaBla)</small>
179
+
180
+ </li>
181
+
182
+ </ul>
183
+ </ul>
184
+
185
+
186
+ <ul id="alpha_T" class="alpha">
187
+ <li class="letter">T</li>
188
+ <ul>
189
+
190
+ <li>
191
+ <span class='object_link'><a href="BlaBla/Texto.html" title="BlaBla::Texto (module)">Texto</a></span>
192
+
193
+ <small>(BlaBla)</small>
194
+
195
+ </li>
196
+
197
+ </ul>
198
+ </ul>
199
+
200
+
201
+ <ul id="alpha_U" class="alpha">
202
+ <li class="letter">U</li>
203
+ <ul>
204
+
205
+ <li>
206
+ <span class='object_link'><a href="BlaBla/Util.html" title="BlaBla::Util (class)">Util</a></span>
207
+
208
+ <small>(BlaBla)</small>
209
+
210
+ </li>
211
+
212
+ </ul>
213
+ </ul>
214
+
215
+ </td>
216
+ </tr>
217
+ </table>
218
+
219
+ </div>
220
+
221
+ </div>
222
+
223
+ <div id="footer">
224
+ Generated on Fri Apr 12 09:44:17 2013 by
225
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
226
+ 0.8.5.2 (ruby-1.9.3).
227
+ </div>
228
+
229
+ </body>
230
+ </html>