minting 1.3.0 → 1.4.0
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.
- checksums.yaml +4 -4
- data/README.md +17 -2
- data/Rakefile +3 -3
- data/doc/Mint/Currency.html +816 -0
- data/doc/Mint/Money.html +3471 -0
- data/doc/Mint.html +953 -0
- data/doc/Minting.html +142 -0
- data/doc/_index.html +136 -0
- data/doc/agents/AGENTS.md +25 -0
- data/doc/agents/copilot-instructions.md +75 -0
- data/doc/agents/gemini_gem_evaluation.md +245 -0
- data/doc/agents/recommendations.md +335 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +206 -0
- data/doc/css/style.css +1089 -0
- data/doc/file.README.html +379 -0
- data/doc/file_list.html +59 -0
- data/doc/frames.html +22 -0
- data/doc/index.html +379 -0
- data/doc/js/app.js +801 -0
- data/doc/js/full_list.js +334 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +470 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/minting/mint/currency.rb +1 -1
- data/lib/minting/mint/registry.rb +9 -18
- data/lib/minting/money/conversion.rb +5 -16
- data/lib/minting/money/formatting.rb +34 -1
- data/lib/minting/money/money.rb +83 -5
- data/lib/minting/version.rb +1 -1
- data/minting.gemspec +1 -0
- metadata +38 -2
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Class: Mint::Currency
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.44
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css">
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css">
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Mint::Currency";
|
|
19
|
+
relpath = '../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div id="main_progress" aria-hidden="true"></div>
|
|
31
|
+
|
|
32
|
+
<div class="nav_wrap">
|
|
33
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
34
|
+
<div id="resizer"></div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div id="main" tabindex="-1">
|
|
38
|
+
<div id="header">
|
|
39
|
+
<div id="menu">
|
|
40
|
+
|
|
41
|
+
<a href="../_index.html">Index (C)</a> »
|
|
42
|
+
<span class='title'><span class='object_link'><a href="../Mint.html" title="Mint (module)">Mint</a></span></span>
|
|
43
|
+
»
|
|
44
|
+
<span class="title">Currency</span>
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div id="search">
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="class_list_link"
|
|
51
|
+
href="../class_list.html">
|
|
52
|
+
|
|
53
|
+
<svg width="24" height="24">
|
|
54
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
56
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
57
|
+
</svg>
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div id="content"><h1>Class: Mint::Currency
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</h1>
|
|
69
|
+
<div class="box_info">
|
|
70
|
+
|
|
71
|
+
<dl>
|
|
72
|
+
<dt>Inherits:</dt>
|
|
73
|
+
<dd>
|
|
74
|
+
<span class="inheritName">Object</span>
|
|
75
|
+
|
|
76
|
+
<ul class="fullTree">
|
|
77
|
+
<li>Object</li>
|
|
78
|
+
|
|
79
|
+
<li class="next">Mint::Currency</li>
|
|
80
|
+
|
|
81
|
+
</ul>
|
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
83
|
+
|
|
84
|
+
</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<dl>
|
|
98
|
+
<dt>Defined in:</dt>
|
|
99
|
+
<dd>lib/minting/mint/currency.rb
|
|
100
|
+
</dd>
|
|
101
|
+
</dl>
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<h2>Overview</h2><div class="docstring">
|
|
106
|
+
<div class="discussion">
|
|
107
|
+
<p>Represents a specific currency unit, identified by ISO 4217 alphabetic code</p>
|
|
108
|
+
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="tags">
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
<p class="tag_title">See Also:</p>
|
|
115
|
+
<ul class="see">
|
|
116
|
+
|
|
117
|
+
<li><a href="https://www.iso.org/iso-4217-currency-codes.html" target="_parent" title="https://www.iso.org/iso-4217-currency-codes.html">https://www.iso.org/iso-4217-currency-codes.html</a></li>
|
|
118
|
+
|
|
119
|
+
</ul>
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
126
|
+
<ul class="summary">
|
|
127
|
+
|
|
128
|
+
<li class="public ">
|
|
129
|
+
<span class="summary_signature">
|
|
130
|
+
|
|
131
|
+
<a href="#code-instance_method" title="#code (instance method)">#<strong>code</strong> ⇒ Object </a>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
</span>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<span class="note title readonly">readonly</span>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute code.</p></div></span>
|
|
151
|
+
|
|
152
|
+
</li>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<li class="public ">
|
|
156
|
+
<span class="summary_signature">
|
|
157
|
+
|
|
158
|
+
<a href="#country-instance_method" title="#country (instance method)">#<strong>country</strong> ⇒ Object </a>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
</span>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<span class="note title readonly">readonly</span>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute country.</p></div></span>
|
|
178
|
+
|
|
179
|
+
</li>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<li class="public ">
|
|
183
|
+
<span class="summary_signature">
|
|
184
|
+
|
|
185
|
+
<a href="#fractional_multiplier-instance_method" title="#fractional_multiplier (instance method)">#<strong>fractional_multiplier</strong> ⇒ Object </a>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
</span>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
<span class="note title readonly">readonly</span>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute fractional_multiplier.</p></div></span>
|
|
205
|
+
|
|
206
|
+
</li>
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
<li class="public ">
|
|
210
|
+
<span class="summary_signature">
|
|
211
|
+
|
|
212
|
+
<a href="#minimum_amount-instance_method" title="#minimum_amount (instance method)">#<strong>minimum_amount</strong> ⇒ Object </a>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
</span>
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<span class="note title readonly">readonly</span>
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute minimum_amount.</p></div></span>
|
|
232
|
+
|
|
233
|
+
</li>
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
<li class="public ">
|
|
237
|
+
<span class="summary_signature">
|
|
238
|
+
|
|
239
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
</span>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
<span class="note title readonly">readonly</span>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute name.</p></div></span>
|
|
259
|
+
|
|
260
|
+
</li>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
<li class="public ">
|
|
264
|
+
<span class="summary_signature">
|
|
265
|
+
|
|
266
|
+
<a href="#priority-instance_method" title="#priority (instance method)">#<strong>priority</strong> ⇒ Object </a>
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
</span>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
<span class="note title readonly">readonly</span>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute priority.</p></div></span>
|
|
286
|
+
|
|
287
|
+
</li>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<li class="public ">
|
|
291
|
+
<span class="summary_signature">
|
|
292
|
+
|
|
293
|
+
<a href="#subunit-instance_method" title="#subunit (instance method)">#<strong>subunit</strong> ⇒ Object </a>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
</span>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
<span class="note title readonly">readonly</span>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute subunit.</p></div></span>
|
|
313
|
+
|
|
314
|
+
</li>
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
<li class="public ">
|
|
318
|
+
<span class="summary_signature">
|
|
319
|
+
|
|
320
|
+
<a href="#symbol-instance_method" title="#symbol (instance method)">#<strong>symbol</strong> ⇒ Object </a>
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
</span>
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
<span class="note title readonly">readonly</span>
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute symbol.</p></div></span>
|
|
340
|
+
|
|
341
|
+
</li>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
</ul>
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
<h2>
|
|
351
|
+
Instance Method Summary
|
|
352
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
353
|
+
</h2>
|
|
354
|
+
|
|
355
|
+
<ul class="summary">
|
|
356
|
+
|
|
357
|
+
<li class="public ">
|
|
358
|
+
<span class="summary_signature">
|
|
359
|
+
|
|
360
|
+
<a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> ⇒ Object </a>
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
</span>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
375
|
+
|
|
376
|
+
</li>
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
<li class="public ">
|
|
380
|
+
<span class="summary_signature">
|
|
381
|
+
|
|
382
|
+
<a href="#normalize_amount-instance_method" title="#normalize_amount (instance method)">#<strong>normalize_amount</strong>(amount) ⇒ Object </a>
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
</span>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
397
|
+
|
|
398
|
+
</li>
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
</ul>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
<div id="instance_attr_details" class="attr_details">
|
|
407
|
+
<h2>Instance Attribute Details</h2>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
<span id=""></span>
|
|
411
|
+
<div class="method_details first">
|
|
412
|
+
<h3 class="signature first" id="code-instance_method">
|
|
413
|
+
|
|
414
|
+
#<strong>code</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
</h3><div class="docstring">
|
|
421
|
+
<div class="discussion">
|
|
422
|
+
<p>Returns the value of attribute code.</p>
|
|
423
|
+
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
<div class="tags">
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
</div><table class="source_code">
|
|
430
|
+
<tr>
|
|
431
|
+
<td>
|
|
432
|
+
<pre class="lines">
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
6
|
|
436
|
+
7
|
|
437
|
+
8</pre>
|
|
438
|
+
</td>
|
|
439
|
+
<td>
|
|
440
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
441
|
+
|
|
442
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_code'>code</span>
|
|
443
|
+
<span class='ivar'>@code</span>
|
|
444
|
+
<span class='kw'>end</span></pre>
|
|
445
|
+
</td>
|
|
446
|
+
</tr>
|
|
447
|
+
</table>
|
|
448
|
+
</div>
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
<span id=""></span>
|
|
452
|
+
<div class="method_details ">
|
|
453
|
+
<h3 class="signature " id="country-instance_method">
|
|
454
|
+
|
|
455
|
+
#<strong>country</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
</h3><div class="docstring">
|
|
462
|
+
<div class="discussion">
|
|
463
|
+
<p>Returns the value of attribute country.</p>
|
|
464
|
+
|
|
465
|
+
</div>
|
|
466
|
+
</div>
|
|
467
|
+
<div class="tags">
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
</div><table class="source_code">
|
|
471
|
+
<tr>
|
|
472
|
+
<td>
|
|
473
|
+
<pre class="lines">
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
6
|
|
477
|
+
7
|
|
478
|
+
8</pre>
|
|
479
|
+
</td>
|
|
480
|
+
<td>
|
|
481
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
482
|
+
|
|
483
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_country'>country</span>
|
|
484
|
+
<span class='ivar'>@country</span>
|
|
485
|
+
<span class='kw'>end</span></pre>
|
|
486
|
+
</td>
|
|
487
|
+
</tr>
|
|
488
|
+
</table>
|
|
489
|
+
</div>
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
<span id=""></span>
|
|
493
|
+
<div class="method_details ">
|
|
494
|
+
<h3 class="signature " id="fractional_multiplier-instance_method">
|
|
495
|
+
|
|
496
|
+
#<strong>fractional_multiplier</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
</h3><div class="docstring">
|
|
503
|
+
<div class="discussion">
|
|
504
|
+
<p>Returns the value of attribute fractional_multiplier.</p>
|
|
505
|
+
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
<div class="tags">
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
</div><table class="source_code">
|
|
512
|
+
<tr>
|
|
513
|
+
<td>
|
|
514
|
+
<pre class="lines">
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
6
|
|
518
|
+
7
|
|
519
|
+
8</pre>
|
|
520
|
+
</td>
|
|
521
|
+
<td>
|
|
522
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
523
|
+
|
|
524
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fractional_multiplier'>fractional_multiplier</span>
|
|
525
|
+
<span class='ivar'>@fractional_multiplier</span>
|
|
526
|
+
<span class='kw'>end</span></pre>
|
|
527
|
+
</td>
|
|
528
|
+
</tr>
|
|
529
|
+
</table>
|
|
530
|
+
</div>
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
<span id=""></span>
|
|
534
|
+
<div class="method_details ">
|
|
535
|
+
<h3 class="signature " id="minimum_amount-instance_method">
|
|
536
|
+
|
|
537
|
+
#<strong>minimum_amount</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
</h3><div class="docstring">
|
|
544
|
+
<div class="discussion">
|
|
545
|
+
<p>Returns the value of attribute minimum_amount.</p>
|
|
546
|
+
|
|
547
|
+
</div>
|
|
548
|
+
</div>
|
|
549
|
+
<div class="tags">
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
</div><table class="source_code">
|
|
553
|
+
<tr>
|
|
554
|
+
<td>
|
|
555
|
+
<pre class="lines">
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
6
|
|
559
|
+
7
|
|
560
|
+
8</pre>
|
|
561
|
+
</td>
|
|
562
|
+
<td>
|
|
563
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
564
|
+
|
|
565
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_minimum_amount'>minimum_amount</span>
|
|
566
|
+
<span class='ivar'>@minimum_amount</span>
|
|
567
|
+
<span class='kw'>end</span></pre>
|
|
568
|
+
</td>
|
|
569
|
+
</tr>
|
|
570
|
+
</table>
|
|
571
|
+
</div>
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
<span id=""></span>
|
|
575
|
+
<div class="method_details ">
|
|
576
|
+
<h3 class="signature " id="name-instance_method">
|
|
577
|
+
|
|
578
|
+
#<strong>name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
</h3><div class="docstring">
|
|
585
|
+
<div class="discussion">
|
|
586
|
+
<p>Returns the value of attribute name.</p>
|
|
587
|
+
|
|
588
|
+
</div>
|
|
589
|
+
</div>
|
|
590
|
+
<div class="tags">
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
</div><table class="source_code">
|
|
594
|
+
<tr>
|
|
595
|
+
<td>
|
|
596
|
+
<pre class="lines">
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
6
|
|
600
|
+
7
|
|
601
|
+
8</pre>
|
|
602
|
+
</td>
|
|
603
|
+
<td>
|
|
604
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
605
|
+
|
|
606
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
|
607
|
+
<span class='ivar'>@name</span>
|
|
608
|
+
<span class='kw'>end</span></pre>
|
|
609
|
+
</td>
|
|
610
|
+
</tr>
|
|
611
|
+
</table>
|
|
612
|
+
</div>
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
<span id=""></span>
|
|
616
|
+
<div class="method_details ">
|
|
617
|
+
<h3 class="signature " id="priority-instance_method">
|
|
618
|
+
|
|
619
|
+
#<strong>priority</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
</h3><div class="docstring">
|
|
626
|
+
<div class="discussion">
|
|
627
|
+
<p>Returns the value of attribute priority.</p>
|
|
628
|
+
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
<div class="tags">
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
</div><table class="source_code">
|
|
635
|
+
<tr>
|
|
636
|
+
<td>
|
|
637
|
+
<pre class="lines">
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
6
|
|
641
|
+
7
|
|
642
|
+
8</pre>
|
|
643
|
+
</td>
|
|
644
|
+
<td>
|
|
645
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
646
|
+
|
|
647
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span>
|
|
648
|
+
<span class='ivar'>@priority</span>
|
|
649
|
+
<span class='kw'>end</span></pre>
|
|
650
|
+
</td>
|
|
651
|
+
</tr>
|
|
652
|
+
</table>
|
|
653
|
+
</div>
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
<span id=""></span>
|
|
657
|
+
<div class="method_details ">
|
|
658
|
+
<h3 class="signature " id="subunit-instance_method">
|
|
659
|
+
|
|
660
|
+
#<strong>subunit</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
</h3><div class="docstring">
|
|
667
|
+
<div class="discussion">
|
|
668
|
+
<p>Returns the value of attribute subunit.</p>
|
|
669
|
+
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
<div class="tags">
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
</div><table class="source_code">
|
|
676
|
+
<tr>
|
|
677
|
+
<td>
|
|
678
|
+
<pre class="lines">
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
6
|
|
682
|
+
7
|
|
683
|
+
8</pre>
|
|
684
|
+
</td>
|
|
685
|
+
<td>
|
|
686
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
687
|
+
|
|
688
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_subunit'>subunit</span>
|
|
689
|
+
<span class='ivar'>@subunit</span>
|
|
690
|
+
<span class='kw'>end</span></pre>
|
|
691
|
+
</td>
|
|
692
|
+
</tr>
|
|
693
|
+
</table>
|
|
694
|
+
</div>
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
<span id=""></span>
|
|
698
|
+
<div class="method_details ">
|
|
699
|
+
<h3 class="signature " id="symbol-instance_method">
|
|
700
|
+
|
|
701
|
+
#<strong>symbol</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
</h3><div class="docstring">
|
|
708
|
+
<div class="discussion">
|
|
709
|
+
<p>Returns the value of attribute symbol.</p>
|
|
710
|
+
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
<div class="tags">
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
</div><table class="source_code">
|
|
717
|
+
<tr>
|
|
718
|
+
<td>
|
|
719
|
+
<pre class="lines">
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
6
|
|
723
|
+
7
|
|
724
|
+
8</pre>
|
|
725
|
+
</td>
|
|
726
|
+
<td>
|
|
727
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 6</span>
|
|
728
|
+
|
|
729
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_symbol'>symbol</span>
|
|
730
|
+
<span class='ivar'>@symbol</span>
|
|
731
|
+
<span class='kw'>end</span></pre>
|
|
732
|
+
</td>
|
|
733
|
+
</tr>
|
|
734
|
+
</table>
|
|
735
|
+
</div>
|
|
736
|
+
|
|
737
|
+
</div>
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
<div id="instance_method_details" class="method_details_list">
|
|
741
|
+
<h2>Instance Method Details</h2>
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
<div class="method_details first">
|
|
745
|
+
<h3 class="signature first" id="inspect-instance_method">
|
|
746
|
+
|
|
747
|
+
#<strong>inspect</strong> ⇒ <tt>Object</tt>
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
</h3><table class="source_code">
|
|
754
|
+
<tr>
|
|
755
|
+
<td>
|
|
756
|
+
<pre class="lines">
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
11
|
|
760
|
+
12
|
|
761
|
+
13</pre>
|
|
762
|
+
</td>
|
|
763
|
+
<td>
|
|
764
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 11</span>
|
|
765
|
+
|
|
766
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
|
767
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'><Currency:(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_code'>code</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_symbol'>symbol</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_subunit'>subunit</span><span class='embexpr_end'>}</span><span class='tstring_content'>)></span><span class='tstring_end'>"</span></span>
|
|
768
|
+
<span class='kw'>end</span></pre>
|
|
769
|
+
</td>
|
|
770
|
+
</tr>
|
|
771
|
+
</table>
|
|
772
|
+
</div>
|
|
773
|
+
|
|
774
|
+
<div class="method_details ">
|
|
775
|
+
<h3 class="signature " id="normalize_amount-instance_method">
|
|
776
|
+
|
|
777
|
+
#<strong>normalize_amount</strong>(amount) ⇒ <tt>Object</tt>
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
</h3><table class="source_code">
|
|
784
|
+
<tr>
|
|
785
|
+
<td>
|
|
786
|
+
<pre class="lines">
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
15
|
|
790
|
+
16
|
|
791
|
+
17</pre>
|
|
792
|
+
</td>
|
|
793
|
+
<td>
|
|
794
|
+
<pre class="code"><span class="info file"># File 'lib/minting/mint/currency.rb', line 15</span>
|
|
795
|
+
|
|
796
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_normalize_amount'>normalize_amount</span><span class='lparen'>(</span><span class='id identifier rubyid_amount'>amount</span><span class='rparen'>)</span>
|
|
797
|
+
<span class='id identifier rubyid_amount'>amount</span><span class='period'>.</span><span class='id identifier rubyid_to_r'>to_r</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='id identifier rubyid_subunit'>subunit</span><span class='rparen'>)</span>
|
|
798
|
+
<span class='kw'>end</span></pre>
|
|
799
|
+
</td>
|
|
800
|
+
</tr>
|
|
801
|
+
</table>
|
|
802
|
+
</div>
|
|
803
|
+
|
|
804
|
+
</div>
|
|
805
|
+
|
|
806
|
+
</div>
|
|
807
|
+
|
|
808
|
+
<div id="footer">
|
|
809
|
+
Generated on Tue Jun 2 14:44:35 2026 by
|
|
810
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
811
|
+
0.9.44 (ruby-4.0.1).
|
|
812
|
+
</div>
|
|
813
|
+
|
|
814
|
+
</div>
|
|
815
|
+
</body>
|
|
816
|
+
</html>
|