rrlist 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,634 @@
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
+ Module: RRMath
8
+
9
+ &mdash; Documentation by YARD 0.8.6.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" 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 (R)</a> &raquo;
35
+
36
+
37
+ <span class="title">RRMath</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>Module: RRMath
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/rrlist/rrmath.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+
88
+ <h2>Constant Summary</h2>
89
+
90
+ <dl class="constants">
91
+
92
+ <dt id="FUNCTIONS_PROC-constant" class="">FUNCTIONS_PROC =
93
+
94
+ </dt>
95
+ <dd><pre class="code"><span class='lbrace'>{</span>
96
+ <span class='label'>avg:</span> <span class='const'>RRMath</span><span class='op'>::</span><span class='id identifier rubyid_agregate_proc'>agregate_proc</span><span class='comma'>,</span>
97
+ <span class='label'>max:</span> <span class='const'>RRMath</span><span class='op'>::</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span>
98
+ <span class='label'>min:</span> <span class='const'>RRMath</span><span class='op'>::</span><span class='id identifier rubyid_min'>min</span><span class='comma'>,</span>
99
+ <span class='label'>incr:</span> <span class='const'>RRMath</span><span class='op'>::</span><span class='id identifier rubyid_sum'>sum</span><span class='comma'>,</span>
100
+ <span class='label'>decr:</span><span class='const'>RRMath</span><span class='op'>::</span><span class='id identifier rubyid_decr'>decr</span>
101
+ <span class='rbrace'>}</span></pre></dd>
102
+
103
+ </dl>
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <h2>
114
+ Class Method Summary
115
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
116
+ </h2>
117
+
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#agregate_proc-class_method" title="agregate_proc (class method)">+ (Object) <strong>agregate_proc</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <span class="summary_desc"><div class='inline'></div></span>
138
+
139
+ </li>
140
+
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#average-class_method" title="average (class method)">+ (Object) <strong>average</strong>(numbers, previous_average, add_average, add_numbers = 1) </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'></div></span>
160
+
161
+ </li>
162
+
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#decr-class_method" title="decr (class method)">+ (Object) <strong>decr</strong> </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'></div></span>
182
+
183
+ </li>
184
+
185
+
186
+ <li class="public ">
187
+ <span class="summary_signature">
188
+
189
+ <a href="#function-class_method" title="function (class method)">+ (Object) <strong>function</strong>(name) </a>
190
+
191
+
192
+
193
+ </span>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+ <span class="summary_desc"><div class='inline'></div></span>
204
+
205
+ </li>
206
+
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#get_function_prod-class_method" title="get_function_prod (class method)">+ (Object) <strong>get_function_prod</strong>(name) </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'></div></span>
226
+
227
+ </li>
228
+
229
+
230
+ <li class="public ">
231
+ <span class="summary_signature">
232
+
233
+ <a href="#max-class_method" title="max (class method)">+ (Object) <strong>max</strong> </a>
234
+
235
+
236
+
237
+ </span>
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+ <span class="summary_desc"><div class='inline'></div></span>
248
+
249
+ </li>
250
+
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#min-class_method" title="min (class method)">+ (Object) <strong>min</strong> </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ <span class="summary_desc"><div class='inline'></div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#sum-class_method" title="sum (class method)">+ (Object) <strong>sum</strong> </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+ <span class="summary_desc"><div class='inline'></div></span>
292
+
293
+ </li>
294
+
295
+
296
+ </ul>
297
+
298
+
299
+
300
+
301
+ <div id="class_method_details" class="method_details_list">
302
+ <h2>Class Method Details</h2>
303
+
304
+
305
+ <div class="method_details first">
306
+ <h3 class="signature first" id="agregate_proc-class_method">
307
+
308
+ + (<tt>Object</tt>) <strong>agregate_proc</strong>
309
+
310
+
311
+
312
+
313
+
314
+ </h3><table class="source_code">
315
+ <tr>
316
+ <td>
317
+ <pre class="lines">
318
+
319
+
320
+ 19
321
+ 20
322
+ 21
323
+ 22
324
+ 23
325
+ 24
326
+ 25
327
+ 26
328
+ 27
329
+ 28
330
+ 29
331
+ 30
332
+ 31
333
+ 32
334
+ 33
335
+ 34
336
+ 35
337
+ 36
338
+ 37
339
+ 38
340
+ 39
341
+ 40
342
+ 41
343
+ 42
344
+ 43
345
+ 44
346
+ 45
347
+ 46
348
+ 47
349
+ 48</pre>
350
+ </td>
351
+ <td>
352
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 19</span>
353
+
354
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agregate_proc'>agregate_proc</span>
355
+ <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='comma'>,</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='op'>|</span>
356
+ <span class='kw'>case</span> <span class='id identifier rubyid_new_value'>new_value</span>
357
+ <span class='kw'>when</span> <span class='const'>Hash</span>
358
+ <span class='kw'>if</span> <span class='id identifier rubyid_old_value'>old_value</span>
359
+ <span class='lbrace'>{</span>
360
+ <span class='label'>value:</span> <span class='const'>RRMath</span><span class='period'>.</span><span class='id identifier rubyid_average'>average</span><span class='lparen'>(</span><span class='id identifier rubyid_old_value'>old_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_old_value'>old_value</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_new_value'>new_value</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_new_value'>new_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
361
+ <span class='label'>size:</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span>
362
+ <span class='rbrace'>}</span>
363
+ <span class='kw'>else</span>
364
+ <span class='lbrace'>{</span>
365
+ <span class='label'>value:</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='comma'>,</span>
366
+ <span class='label'>size:</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span><span class='comma'>,</span>
367
+ <span class='rbrace'>}</span>
368
+ <span class='kw'>end</span>
369
+ <span class='kw'>else</span>
370
+ <span class='kw'>if</span> <span class='id identifier rubyid_old_value'>old_value</span>
371
+ <span class='lbrace'>{</span>
372
+ <span class='label'>value:</span> <span class='const'>RRMath</span><span class='period'>.</span><span class='id identifier rubyid_average'>average</span><span class='lparen'>(</span><span class='id identifier rubyid_old_value'>old_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_old_value'>old_value</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_new_value'>new_value</span><span class='rparen'>)</span><span class='comma'>,</span>
373
+ <span class='label'>size:</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='lbracket'>[</span><span class='symbol'>:size</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='int'>1</span>
374
+ <span class='rbrace'>}</span>
375
+ <span class='kw'>else</span>
376
+ <span class='lbrace'>{</span>
377
+ <span class='label'>value:</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='comma'>,</span>
378
+ <span class='label'>size:</span> <span class='int'>1</span><span class='comma'>,</span>
379
+ <span class='rbrace'>}</span>
380
+ <span class='kw'>end</span>
381
+ <span class='kw'>end</span>
382
+ <span class='kw'>end</span>
383
+ <span class='kw'>end</span></pre>
384
+ </td>
385
+ </tr>
386
+ </table>
387
+ </div>
388
+
389
+ <div class="method_details ">
390
+ <h3 class="signature " id="average-class_method">
391
+
392
+ + (<tt>Object</tt>) <strong>average</strong>(numbers, previous_average, add_average, add_numbers = 1)
393
+
394
+
395
+
396
+
397
+
398
+ </h3><table class="source_code">
399
+ <tr>
400
+ <td>
401
+ <pre class="lines">
402
+
403
+
404
+ 11
405
+ 12
406
+ 13
407
+ 14
408
+ 15
409
+ 16
410
+ 17</pre>
411
+ </td>
412
+ <td>
413
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 11</span>
414
+
415
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_average'>average</span><span class='lparen'>(</span><span class='id identifier rubyid_numbers'>numbers</span><span class='comma'>,</span><span class='id identifier rubyid_previous_average'>previous_average</span><span class='comma'>,</span><span class='id identifier rubyid_add_average'>add_average</span><span class='comma'>,</span><span class='id identifier rubyid_add_numbers'>add_numbers</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span>
416
+ <span class='id identifier rubyid_numbers'>numbers</span> <span class='op'>=</span> <span class='id identifier rubyid_numbers'>numbers</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
417
+ <span class='id identifier rubyid_previous_average'>previous_average</span> <span class='op'>=</span> <span class='id identifier rubyid_previous_average'>previous_average</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
418
+ <span class='id identifier rubyid_add_average'>add_average</span> <span class='op'>=</span> <span class='id identifier rubyid_add_average'>add_average</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
419
+
420
+ <span class='lparen'>(</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_numbers'>numbers</span><span class='op'>*</span><span class='id identifier rubyid_previous_average'>previous_average</span> <span class='rparen'>)</span><span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_add_average'>add_average</span><span class='op'>*</span><span class='id identifier rubyid_add_numbers'>add_numbers</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='op'>/</span><span class='lparen'>(</span><span class='id identifier rubyid_numbers'>numbers</span><span class='op'>+</span><span class='id identifier rubyid_add_numbers'>add_numbers</span><span class='rparen'>)</span><span class='rparen'>)</span>
421
+ <span class='kw'>end</span></pre>
422
+ </td>
423
+ </tr>
424
+ </table>
425
+ </div>
426
+
427
+ <div class="method_details ">
428
+ <h3 class="signature " id="decr-class_method">
429
+
430
+ + (<tt>Object</tt>) <strong>decr</strong>
431
+
432
+
433
+
434
+
435
+
436
+ </h3><table class="source_code">
437
+ <tr>
438
+ <td>
439
+ <pre class="lines">
440
+
441
+
442
+ 68
443
+ 69
444
+ 70
445
+ 71
446
+ 72</pre>
447
+ </td>
448
+ <td>
449
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 68</span>
450
+
451
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_decr'>decr</span>
452
+ <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='comma'>,</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='op'>|</span>
453
+ <span class='id identifier rubyid_old_value'>old_value</span> <span class='op'>?</span> <span class='lparen'>(</span><span class='id identifier rubyid_old_value'>old_value</span> <span class='op'>-</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_new_value'>new_value</span>
454
+ <span class='kw'>end</span>
455
+ <span class='kw'>end</span></pre>
456
+ </td>
457
+ </tr>
458
+ </table>
459
+ </div>
460
+
461
+ <div class="method_details ">
462
+ <h3 class="signature " id="function-class_method">
463
+
464
+ + (<tt>Object</tt>) <strong>function</strong>(name)
465
+
466
+
467
+
468
+
469
+
470
+ </h3><table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
474
+
475
+
476
+ 7
477
+ 8
478
+ 9</pre>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 7</span>
482
+
483
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_function'>function</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
484
+ <span class='const'>RRMath</span><span class='op'>::</span><span class='const'>FUNCTIONS_PROC</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Function </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> cannot be found</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="get_function_prod-class_method">
493
+
494
+ + (<tt>Object</tt>) <strong>get_function_prod</strong>(name)
495
+
496
+
497
+
498
+
499
+
500
+ </h3><table class="source_code">
501
+ <tr>
502
+ <td>
503
+ <pre class="lines">
504
+
505
+
506
+ 3
507
+ 4
508
+ 5</pre>
509
+ </td>
510
+ <td>
511
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 3</span>
512
+
513
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_function_prod'>get_function_prod</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
514
+ <span class='const'>FUNCTIONS_PROC</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
515
+ <span class='kw'>end</span></pre>
516
+ </td>
517
+ </tr>
518
+ </table>
519
+ </div>
520
+
521
+ <div class="method_details ">
522
+ <h3 class="signature " id="max-class_method">
523
+
524
+ + (<tt>Object</tt>) <strong>max</strong>
525
+
526
+
527
+
528
+
529
+
530
+ </h3><table class="source_code">
531
+ <tr>
532
+ <td>
533
+ <pre class="lines">
534
+
535
+
536
+ 50
537
+ 51
538
+ 52
539
+ 53
540
+ 54</pre>
541
+ </td>
542
+ <td>
543
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 50</span>
544
+
545
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
546
+ <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='comma'>,</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='op'>|</span>
547
+ <span class='id identifier rubyid_old_value'>old_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_new_value'>new_value</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_new_value'>new_value</span> <span class='op'>:</span> <span class='id identifier rubyid_old_value'>old_value</span>
548
+ <span class='kw'>end</span>
549
+ <span class='kw'>end</span></pre>
550
+ </td>
551
+ </tr>
552
+ </table>
553
+ </div>
554
+
555
+ <div class="method_details ">
556
+ <h3 class="signature " id="min-class_method">
557
+
558
+ + (<tt>Object</tt>) <strong>min</strong>
559
+
560
+
561
+
562
+
563
+
564
+ </h3><table class="source_code">
565
+ <tr>
566
+ <td>
567
+ <pre class="lines">
568
+
569
+
570
+ 56
571
+ 57
572
+ 58
573
+ 59
574
+ 60</pre>
575
+ </td>
576
+ <td>
577
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 56</span>
578
+
579
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span>
580
+ <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='comma'>,</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='op'>|</span>
581
+ <span class='id identifier rubyid_old_value'>old_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_new_value'>new_value</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_new_value'>new_value</span> <span class='op'>:</span> <span class='id identifier rubyid_old_value'>old_value</span>
582
+ <span class='kw'>end</span>
583
+ <span class='kw'>end</span></pre>
584
+ </td>
585
+ </tr>
586
+ </table>
587
+ </div>
588
+
589
+ <div class="method_details ">
590
+ <h3 class="signature " id="sum-class_method">
591
+
592
+ + (<tt>Object</tt>) <strong>sum</strong>
593
+
594
+
595
+
596
+
597
+
598
+ </h3><table class="source_code">
599
+ <tr>
600
+ <td>
601
+ <pre class="lines">
602
+
603
+
604
+ 62
605
+ 63
606
+ 64
607
+ 65
608
+ 66</pre>
609
+ </td>
610
+ <td>
611
+ <pre class="code"><span class="info file"># File 'lib/rrlist/rrmath.rb', line 62</span>
612
+
613
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_sum'>sum</span>
614
+ <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='comma'>,</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='op'>|</span>
615
+ <span class='id identifier rubyid_old_value'>old_value</span> <span class='op'>?</span> <span class='lparen'>(</span><span class='id identifier rubyid_old_value'>old_value</span> <span class='op'>+</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_new_value'>new_value</span>
616
+ <span class='kw'>end</span>
617
+ <span class='kw'>end</span></pre>
618
+ </td>
619
+ </tr>
620
+ </table>
621
+ </div>
622
+
623
+ </div>
624
+
625
+ </div>
626
+
627
+ <div id="footer">
628
+ Generated on Mon May 27 09:38:35 2013 by
629
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
630
+ 0.8.6.1 (ruby-1.9.2).
631
+ </div>
632
+
633
+ </body>
634
+ </html>