minting 1.9.6 → 1.9.7
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 +30 -25
- data/Rakefile +16 -20
- data/bin/bench_check +2 -2
- data/doc/Mint/Currency.html +183 -94
- data/doc/Mint/Money.html +866 -334
- data/doc/Mint/RangeStepPatch.html +1 -1
- data/doc/Mint/Registry.html +10 -10
- data/doc/Mint/Rounding.html +2 -2
- data/doc/Mint/UnknownCurrency.html +6 -4
- data/doc/Mint.html +33 -106
- data/doc/Minting.html +2 -2
- data/doc/Numeric.html +479 -0
- data/doc/String.html +241 -0
- data/doc/_index.html +27 -1
- data/doc/agents/copilot-instructions.md +3 -3
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +47 -33
- data/doc/index.html +47 -33
- data/doc/method_list.html +125 -53
- data/doc/top-level-namespace.html +5 -21
- data/lib/minting/currency/currency.rb +6 -3
- data/lib/minting/data/world-currencies.yaml +75 -23
- data/lib/minting/mint/i18n.rb +1 -1
- data/lib/minting/mint/rounding.rb +1 -0
- data/lib/minting/money/conversion.rb +1 -0
- data/lib/minting/money/format/formatting.rb +88 -55
- data/lib/minting/money/format/to_s.rb +20 -3
- data/lib/minting/money/money.rb +0 -4
- data/lib/minting/version.rb +1 -1
- metadata +3 -2
- data/doc/Mint/CurrencyRegistry.html +0 -511
data/doc/Mint/Currency.html
CHANGED
|
@@ -183,6 +183,33 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
183
183
|
</li>
|
|
184
184
|
|
|
185
185
|
|
|
186
|
+
<li class="public ">
|
|
187
|
+
<span class="summary_signature">
|
|
188
|
+
|
|
189
|
+
<a href="#disambiguate_symbol-instance_method" title="#disambiguate_symbol (instance method)">#<strong>disambiguate_symbol</strong> ⇒ String<sup>?</sup> </a>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
</span>
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
<span class="note title readonly">readonly</span>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<span class="summary_desc"><div class='inline'><p>A longer, code-prefixed variant to distinguish currencies that share the same primary symbol (e.g. "US$" for USD, "C$" for CAD).</p></div></span>
|
|
209
|
+
|
|
210
|
+
</li>
|
|
211
|
+
|
|
212
|
+
|
|
186
213
|
<li class="public ">
|
|
187
214
|
<span class="summary_signature">
|
|
188
215
|
|
|
@@ -476,7 +503,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
476
503
|
<li class="public ">
|
|
477
504
|
<span class="summary_signature">
|
|
478
505
|
|
|
479
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(code:, symbol:, subunit: 0, priority: 0, country: nil, name: nil) ⇒ Currency </a>
|
|
506
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(code:, symbol:, subunit: 0, priority: 0, country: nil, name: nil, disambiguate_symbol: nil) ⇒ Currency </a>
|
|
480
507
|
|
|
481
508
|
|
|
482
509
|
|
|
@@ -596,7 +623,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
596
623
|
<div class="method_details first">
|
|
597
624
|
<h3 class="signature first" id="initialize-instance_method">
|
|
598
625
|
|
|
599
|
-
#<strong>initialize</strong>(code:, symbol:, subunit: 0, priority: 0, country: nil, name: nil) ⇒ <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>
|
|
626
|
+
#<strong>initialize</strong>(code:, symbol:, subunit: 0, priority: 0, country: nil, name: nil, disambiguate_symbol: nil) ⇒ <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>
|
|
600
627
|
|
|
601
628
|
|
|
602
629
|
|
|
@@ -617,7 +644,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
617
644
|
<span class='name'>code</span>
|
|
618
645
|
|
|
619
646
|
|
|
620
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
647
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
621
648
|
|
|
622
649
|
|
|
623
650
|
|
|
@@ -631,7 +658,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
631
658
|
<span class='name'>symbol</span>
|
|
632
659
|
|
|
633
660
|
|
|
634
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
661
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
635
662
|
|
|
636
663
|
|
|
637
664
|
|
|
@@ -677,7 +704,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
677
704
|
<span class='name'>country</span>
|
|
678
705
|
|
|
679
706
|
|
|
680
|
-
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
|
|
707
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt>nil</tt>)</span>
|
|
681
708
|
|
|
682
709
|
|
|
683
710
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
@@ -693,7 +720,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
693
720
|
<span class='name'>name</span>
|
|
694
721
|
|
|
695
722
|
|
|
696
|
-
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
|
|
723
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt>nil</tt>)</span>
|
|
697
724
|
|
|
698
725
|
|
|
699
726
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
@@ -713,23 +740,25 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
713
740
|
<pre class="lines">
|
|
714
741
|
|
|
715
742
|
|
|
716
|
-
26
|
|
717
|
-
27
|
|
718
743
|
28
|
|
719
744
|
29
|
|
720
745
|
30
|
|
721
746
|
31
|
|
722
|
-
32
|
|
747
|
+
32
|
|
748
|
+
33
|
|
749
|
+
34
|
|
750
|
+
35</pre>
|
|
723
751
|
</td>
|
|
724
752
|
<td>
|
|
725
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
753
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 28</span>
|
|
726
754
|
|
|
727
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>code:</span><span class='comma'>,</span> <span class='label'>symbol:</span><span class='comma'>,</span> <span class='label'>subunit:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>country:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='kw'>nil</span><span class='
|
|
755
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>code:</span><span class='comma'>,</span> <span class='label'>symbol:</span><span class='comma'>,</span> <span class='label'>subunit:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>country:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
|
756
|
+
<span class='label'>disambiguate_symbol:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
728
757
|
<span class='id identifier rubyid_subunit'>subunit</span> <span class='op'>=</span> <span class='id identifier rubyid_subunit'>subunit</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
|
729
758
|
<span class='id identifier rubyid_priority'>priority</span> <span class='op'>=</span> <span class='id identifier rubyid_priority'>priority</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
|
730
759
|
<span class='id identifier rubyid_fractional_multiplier'>fractional_multiplier</span> <span class='op'>=</span> <span class='int'>10</span><span class='op'>**</span><span class='id identifier rubyid_subunit'>subunit</span>
|
|
731
760
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='label'>code:</span><span class='comma'>,</span> <span class='label'>subunit:</span><span class='comma'>,</span> <span class='label'>symbol:</span><span class='comma'>,</span> <span class='label'>priority:</span><span class='comma'>,</span> <span class='label'>country:</span><span class='comma'>,</span> <span class='label'>name:</span><span class='comma'>,</span>
|
|
732
|
-
<span class='label'>fractional_multiplier:</span><span class='rparen'>)</span>
|
|
761
|
+
<span class='label'>fractional_multiplier:</span><span class='comma'>,</span> <span class='label'>disambiguate_symbol:</span><span class='rparen'>)</span>
|
|
733
762
|
<span class='kw'>end</span></pre>
|
|
734
763
|
</td>
|
|
735
764
|
</tr>
|
|
@@ -746,7 +775,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
746
775
|
<div class="method_details first">
|
|
747
776
|
<h3 class="signature first" id="code-instance_method">
|
|
748
777
|
|
|
749
|
-
#<strong>code</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span>
|
|
778
|
+
#<strong>code</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt> <span class="extras">(readonly)</span>
|
|
750
779
|
|
|
751
780
|
|
|
752
781
|
|
|
@@ -766,7 +795,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
766
795
|
<li>
|
|
767
796
|
|
|
768
797
|
|
|
769
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
798
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
770
799
|
|
|
771
800
|
|
|
772
801
|
|
|
@@ -783,12 +812,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
783
812
|
<pre class="lines">
|
|
784
813
|
|
|
785
814
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
815
|
+
20
|
|
816
|
+
21
|
|
817
|
+
22</pre>
|
|
789
818
|
</td>
|
|
790
819
|
<td>
|
|
791
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
820
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
792
821
|
|
|
793
822
|
<span class='kw'>def</span> <span class='id identifier rubyid_code'>code</span>
|
|
794
823
|
<span class='ivar'>@code</span>
|
|
@@ -803,7 +832,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
803
832
|
<div class="method_details ">
|
|
804
833
|
<h3 class="signature " id="country-instance_method">
|
|
805
834
|
|
|
806
|
-
#<strong>country</strong> ⇒ <tt>String</tt><sup>?</sup> <span class="extras">(readonly)</span>
|
|
835
|
+
#<strong>country</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt><sup>?</sup> <span class="extras">(readonly)</span>
|
|
807
836
|
|
|
808
837
|
|
|
809
838
|
|
|
@@ -823,7 +852,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
823
852
|
<li>
|
|
824
853
|
|
|
825
854
|
|
|
826
|
-
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
|
|
855
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt>nil</tt>)</span>
|
|
827
856
|
|
|
828
857
|
|
|
829
858
|
|
|
@@ -840,12 +869,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
840
869
|
<pre class="lines">
|
|
841
870
|
|
|
842
871
|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
872
|
+
20
|
|
873
|
+
21
|
|
874
|
+
22</pre>
|
|
846
875
|
</td>
|
|
847
876
|
<td>
|
|
848
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
877
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
849
878
|
|
|
850
879
|
<span class='kw'>def</span> <span class='id identifier rubyid_country'>country</span>
|
|
851
880
|
<span class='ivar'>@country</span>
|
|
@@ -856,6 +885,64 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
856
885
|
</div>
|
|
857
886
|
|
|
858
887
|
|
|
888
|
+
<span id=""></span>
|
|
889
|
+
<div class="method_details ">
|
|
890
|
+
<h3 class="signature " id="disambiguate_symbol-instance_method">
|
|
891
|
+
|
|
892
|
+
#<strong>disambiguate_symbol</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt><sup>?</sup> <span class="extras">(readonly)</span>
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
</h3><div class="docstring">
|
|
899
|
+
<div class="discussion">
|
|
900
|
+
<p>A longer, code-prefixed variant to distinguish
|
|
901
|
+
currencies that share the same primary symbol (e.g. "US$" for USD, "C$" for CAD).</p>
|
|
902
|
+
|
|
903
|
+
</div>
|
|
904
|
+
</div>
|
|
905
|
+
<div class="tags">
|
|
906
|
+
|
|
907
|
+
<p class="tag_title">Returns:</p>
|
|
908
|
+
<ul class="return">
|
|
909
|
+
|
|
910
|
+
<li>
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt>nil</tt>)</span>
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
—
|
|
918
|
+
<div class='inline'><p>the current value of disambiguate_symbol</p></div>
|
|
919
|
+
|
|
920
|
+
</li>
|
|
921
|
+
|
|
922
|
+
</ul>
|
|
923
|
+
|
|
924
|
+
</div><table class="source_code">
|
|
925
|
+
<tr>
|
|
926
|
+
<td>
|
|
927
|
+
<pre class="lines">
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
20
|
|
931
|
+
21
|
|
932
|
+
22</pre>
|
|
933
|
+
</td>
|
|
934
|
+
<td>
|
|
935
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
936
|
+
|
|
937
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_disambiguate_symbol'>disambiguate_symbol</span>
|
|
938
|
+
<span class='ivar'>@disambiguate_symbol</span>
|
|
939
|
+
<span class='kw'>end</span></pre>
|
|
940
|
+
</td>
|
|
941
|
+
</tr>
|
|
942
|
+
</table>
|
|
943
|
+
</div>
|
|
944
|
+
|
|
945
|
+
|
|
859
946
|
<span id=""></span>
|
|
860
947
|
<div class="method_details ">
|
|
861
948
|
<h3 class="signature " id="fractional_multiplier-instance_method">
|
|
@@ -897,12 +984,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
897
984
|
<pre class="lines">
|
|
898
985
|
|
|
899
986
|
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
987
|
+
20
|
|
988
|
+
21
|
|
989
|
+
22</pre>
|
|
903
990
|
</td>
|
|
904
991
|
<td>
|
|
905
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
992
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
906
993
|
|
|
907
994
|
<span class='kw'>def</span> <span class='id identifier rubyid_fractional_multiplier'>fractional_multiplier</span>
|
|
908
995
|
<span class='ivar'>@fractional_multiplier</span>
|
|
@@ -917,7 +1004,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
917
1004
|
<div class="method_details ">
|
|
918
1005
|
<h3 class="signature " id="name-instance_method">
|
|
919
1006
|
|
|
920
|
-
#<strong>name</strong> ⇒ <tt>String</tt><sup>?</sup> <span class="extras">(readonly)</span>
|
|
1007
|
+
#<strong>name</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt><sup>?</sup> <span class="extras">(readonly)</span>
|
|
921
1008
|
|
|
922
1009
|
|
|
923
1010
|
|
|
@@ -937,7 +1024,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
937
1024
|
<li>
|
|
938
1025
|
|
|
939
1026
|
|
|
940
|
-
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
|
|
1027
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt>nil</tt>)</span>
|
|
941
1028
|
|
|
942
1029
|
|
|
943
1030
|
|
|
@@ -954,12 +1041,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
954
1041
|
<pre class="lines">
|
|
955
1042
|
|
|
956
1043
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1044
|
+
20
|
|
1045
|
+
21
|
|
1046
|
+
22</pre>
|
|
960
1047
|
</td>
|
|
961
1048
|
<td>
|
|
962
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1049
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
963
1050
|
|
|
964
1051
|
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
|
965
1052
|
<span class='ivar'>@name</span>
|
|
@@ -1011,12 +1098,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1011
1098
|
<pre class="lines">
|
|
1012
1099
|
|
|
1013
1100
|
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1101
|
+
20
|
|
1102
|
+
21
|
|
1103
|
+
22</pre>
|
|
1017
1104
|
</td>
|
|
1018
1105
|
<td>
|
|
1019
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1106
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
1020
1107
|
|
|
1021
1108
|
<span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span>
|
|
1022
1109
|
<span class='ivar'>@priority</span>
|
|
@@ -1068,12 +1155,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1068
1155
|
<pre class="lines">
|
|
1069
1156
|
|
|
1070
1157
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1158
|
+
20
|
|
1159
|
+
21
|
|
1160
|
+
22</pre>
|
|
1074
1161
|
</td>
|
|
1075
1162
|
<td>
|
|
1076
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1163
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
1077
1164
|
|
|
1078
1165
|
<span class='kw'>def</span> <span class='id identifier rubyid_subunit'>subunit</span>
|
|
1079
1166
|
<span class='ivar'>@subunit</span>
|
|
@@ -1088,7 +1175,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1088
1175
|
<div class="method_details ">
|
|
1089
1176
|
<h3 class="signature " id="symbol-instance_method">
|
|
1090
1177
|
|
|
1091
|
-
#<strong>symbol</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span>
|
|
1178
|
+
#<strong>symbol</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt> <span class="extras">(readonly)</span>
|
|
1092
1179
|
|
|
1093
1180
|
|
|
1094
1181
|
|
|
@@ -1108,7 +1195,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1108
1195
|
<li>
|
|
1109
1196
|
|
|
1110
1197
|
|
|
1111
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1198
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
1112
1199
|
|
|
1113
1200
|
|
|
1114
1201
|
|
|
@@ -1125,12 +1212,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1125
1212
|
<pre class="lines">
|
|
1126
1213
|
|
|
1127
1214
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1215
|
+
20
|
|
1216
|
+
21
|
|
1217
|
+
22</pre>
|
|
1131
1218
|
</td>
|
|
1132
1219
|
<td>
|
|
1133
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1220
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 20</span>
|
|
1134
1221
|
|
|
1135
1222
|
<span class='kw'>def</span> <span class='id identifier rubyid_symbol'>symbol</span>
|
|
1136
1223
|
<span class='ivar'>@symbol</span>
|
|
@@ -1171,7 +1258,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1171
1258
|
<span class='name'>code</span>
|
|
1172
1259
|
|
|
1173
1260
|
|
|
1174
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1261
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
1175
1262
|
|
|
1176
1263
|
|
|
1177
1264
|
|
|
@@ -1205,12 +1292,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1205
1292
|
<pre class="lines">
|
|
1206
1293
|
|
|
1207
1294
|
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1295
|
+
105
|
|
1296
|
+
106
|
|
1297
|
+
107</pre>
|
|
1211
1298
|
</td>
|
|
1212
1299
|
<td>
|
|
1213
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1300
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 105</span>
|
|
1214
1301
|
|
|
1215
1302
|
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_for_code'>for_code</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='rparen'>)</span>
|
|
1216
1303
|
<span class='const'><span class='object_link'><a href="Registry.html" title="Mint::Registry (module)">Registry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_currencies'><span class='object_link'><a href="Registry.html#currencies-class_method" title="Mint::Registry.currencies (method)">currencies</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_code'>code</span><span class='rbracket'>]</span>
|
|
@@ -1244,7 +1331,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1244
1331
|
<span class='name'>symbol</span>
|
|
1245
1332
|
|
|
1246
1333
|
|
|
1247
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1334
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
1248
1335
|
|
|
1249
1336
|
|
|
1250
1337
|
|
|
@@ -1278,12 +1365,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1278
1365
|
<pre class="lines">
|
|
1279
1366
|
|
|
1280
1367
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1368
|
+
113
|
|
1369
|
+
114
|
|
1370
|
+
115</pre>
|
|
1284
1371
|
</td>
|
|
1285
1372
|
<td>
|
|
1286
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1373
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 113</span>
|
|
1287
1374
|
|
|
1288
1375
|
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_for_symbol'>for_symbol</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span>
|
|
1289
1376
|
<span class='const'><span class='object_link'><a href="Registry.html" title="Mint::Registry (module)">Registry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_currency_for_symbol'><span class='object_link'><a href="Registry.html#currency_for_symbol-instance_method" title="Mint::Registry#currency_for_symbol (method)">currency_for_symbol</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span>
|
|
@@ -1317,7 +1404,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1317
1404
|
<span class='name'>code</span>
|
|
1318
1405
|
|
|
1319
1406
|
|
|
1320
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1407
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
1321
1408
|
|
|
1322
1409
|
|
|
1323
1410
|
|
|
@@ -1347,7 +1434,7 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1347
1434
|
<span class='name'>symbol</span>
|
|
1348
1435
|
|
|
1349
1436
|
|
|
1350
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1437
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
1351
1438
|
|
|
1352
1439
|
|
|
1353
1440
|
<em class="default">(defaults to: <tt>''</tt>)</em>
|
|
@@ -1427,12 +1514,12 @@ including its subunit precision, display symbol, and formatting rules.</p>
|
|
|
1427
1514
|
<pre class="lines">
|
|
1428
1515
|
|
|
1429
1516
|
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1517
|
+
65
|
|
1518
|
+
66
|
|
1519
|
+
67</pre>
|
|
1433
1520
|
</td>
|
|
1434
1521
|
<td>
|
|
1435
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1522
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 65</span>
|
|
1436
1523
|
|
|
1437
1524
|
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='label'>code:</span><span class='comma'>,</span> <span class='label'>subunit:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>symbol:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='rparen'>)</span>
|
|
1438
1525
|
<span class='const'><span class='object_link'><a href="Registry.html" title="Mint::Registry (module)">Registry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_register'><span class='object_link'><a href="Registry.html#register-class_method" title="Mint::Registry.register (method)">register</a></span></span><span class='lparen'>(</span><span class='label'>code:</span><span class='comma'>,</span> <span class='label'>subunit:</span><span class='comma'>,</span> <span class='label'>symbol:</span><span class='comma'>,</span> <span class='label'>priority:</span><span class='rparen'>)</span>
|
|
@@ -1468,7 +1555,7 @@ Passing a <span class='object_link'><a href="Money.html" title="Mint::Money (cla
|
|
|
1468
1555
|
<span class='name'>object</span>
|
|
1469
1556
|
|
|
1470
1557
|
|
|
1471
|
-
<span class='type'>(<tt>String</tt>, <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>, <tt><span class='object_link'><a href="Money.html" title="Mint::Money (class)">Money</a></span></tt>, <tt>nil</tt>)</span>
|
|
1558
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>, <tt><span class='object_link'><a href="Money.html" title="Mint::Money (class)">Money</a></span></tt>, <tt>nil</tt>)</span>
|
|
1472
1559
|
|
|
1473
1560
|
|
|
1474
1561
|
|
|
@@ -1519,25 +1606,25 @@ or the code is not registered</p></div>
|
|
|
1519
1606
|
<pre class="lines">
|
|
1520
1607
|
|
|
1521
1608
|
|
|
1522
|
-
75
|
|
1523
|
-
76
|
|
1524
|
-
77
|
|
1525
1609
|
78
|
|
1526
1610
|
79
|
|
1527
1611
|
80
|
|
1528
1612
|
81
|
|
1529
1613
|
82
|
|
1530
|
-
83
|
|
1614
|
+
83
|
|
1615
|
+
84
|
|
1616
|
+
85
|
|
1617
|
+
86</pre>
|
|
1531
1618
|
</td>
|
|
1532
1619
|
<td>
|
|
1533
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1620
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 78</span>
|
|
1534
1621
|
|
|
1535
1622
|
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_resolve'>resolve</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span>
|
|
1536
1623
|
<span class='kw'>case</span> <span class='id identifier rubyid_object'>object</span>
|
|
1537
1624
|
<span class='kw'>when</span> <span class='const'>NilClass</span> <span class='kw'>then</span> <span class='kw'>nil</span>
|
|
1538
1625
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span> <span class='kw'>then</span> <span class='id identifier rubyid_object'>object</span>
|
|
1539
1626
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="Money.html" title="Mint::Money (class)">Money</a></span></span> <span class='kw'>then</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_currency'>currency</span>
|
|
1540
|
-
<span class='kw'>when</span> <span class='const'>String</span> <span class='kw'>then</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_for_code'><span class='object_link'><a href="#for_code-class_method" title="Mint::Currency.for_code (method)">for_code</a></span></span> <span class='id identifier rubyid_object'>object</span>
|
|
1627
|
+
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></span> <span class='kw'>then</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_for_code'><span class='object_link'><a href="#for_code-class_method" title="Mint::Currency.for_code (method)">for_code</a></span></span> <span class='id identifier rubyid_object'>object</span>
|
|
1541
1628
|
<span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>currency must be [Currency], [Money], [String] or nil (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_object'>object</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
|
1542
1629
|
<span class='kw'>end</span>
|
|
1543
1630
|
<span class='kw'>end</span></pre>
|
|
@@ -1571,7 +1658,7 @@ or the code is not registered</p></div>
|
|
|
1571
1658
|
<span class='name'>object</span>
|
|
1572
1659
|
|
|
1573
1660
|
|
|
1574
|
-
<span class='type'>(<tt>String</tt>, <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>, <tt><span class='object_link'><a href="Money.html" title="Mint::Money (class)">Money</a></span></tt>, <tt>nil</tt>)</span>
|
|
1661
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>, <tt><span class='object_link'><a href="Money.html" title="Mint::Money (class)">Money</a></span></tt>, <tt>nil</tt>)</span>
|
|
1575
1662
|
|
|
1576
1663
|
|
|
1577
1664
|
|
|
@@ -1604,12 +1691,14 @@ or the code is not registered</p></div>
|
|
|
1604
1691
|
<li>
|
|
1605
1692
|
|
|
1606
1693
|
|
|
1607
|
-
<span class='type'>(<tt>
|
|
1694
|
+
<span class='type'>(<tt><span class='object_link'><a href="UnknownCurrency.html" title="Mint::UnknownCurrency (class)">Mint::UnknownCurrency</a></span></tt>)</span>
|
|
1608
1695
|
|
|
1609
1696
|
|
|
1610
1697
|
|
|
1611
1698
|
—
|
|
1612
|
-
<div class='inline'><p>if <code>object</code> cannot be resolved into a
|
|
1699
|
+
<div class='inline'><p>if <code>object</code> cannot be resolved into a
|
|
1700
|
+
registered currency. <code>Mint::UnknownCurrency</code> inherits from <code>ArgumentError</code>,
|
|
1701
|
+
so existing <code>rescue ArgumentError</code> handlers continue to work.</p></div>
|
|
1613
1702
|
|
|
1614
1703
|
</li>
|
|
1615
1704
|
|
|
@@ -1621,15 +1710,15 @@ or the code is not registered</p></div>
|
|
|
1621
1710
|
<pre class="lines">
|
|
1622
1711
|
|
|
1623
1712
|
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1713
|
+
97
|
|
1714
|
+
98
|
|
1715
|
+
99</pre>
|
|
1627
1716
|
</td>
|
|
1628
1717
|
<td>
|
|
1629
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1718
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 97</span>
|
|
1630
1719
|
|
|
1631
1720
|
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_resolve!'>resolve!</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span>
|
|
1632
|
-
<span class='id identifier rubyid_resolve'>resolve</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>
|
|
1721
|
+
<span class='id identifier rubyid_resolve'>resolve</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../Mint.html" title="Mint (module)">Mint</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="UnknownCurrency.html" title="Mint::UnknownCurrency (class)">UnknownCurrency</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Could not resolve (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_object'>object</span><span class='embexpr_end'>}</span><span class='tstring_content'>) into a currency</span><span class='tstring_end'>"</span></span>
|
|
1633
1722
|
<span class='kw'>end</span></pre>
|
|
1634
1723
|
</td>
|
|
1635
1724
|
</tr>
|
|
@@ -1661,7 +1750,7 @@ for discounts, totals, or placeholders.</p>
|
|
|
1661
1750
|
<span class='name'>currency</span>
|
|
1662
1751
|
|
|
1663
1752
|
|
|
1664
|
-
<span class='type'>(<tt>String</tt>, <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>)</span>
|
|
1753
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></tt>)</span>
|
|
1665
1754
|
|
|
1666
1755
|
|
|
1667
1756
|
|
|
@@ -1694,7 +1783,7 @@ for discounts, totals, or placeholders.</p>
|
|
|
1694
1783
|
<li>
|
|
1695
1784
|
|
|
1696
1785
|
|
|
1697
|
-
<span class='type'>(<tt>
|
|
1786
|
+
<span class='type'>(<tt><span class='object_link'><a href="UnknownCurrency.html" title="Mint::UnknownCurrency (class)">Mint::UnknownCurrency</a></span></tt>)</span>
|
|
1698
1787
|
|
|
1699
1788
|
|
|
1700
1789
|
|
|
@@ -1711,10 +1800,10 @@ for discounts, totals, or placeholders.</p>
|
|
|
1711
1800
|
<pre class="lines">
|
|
1712
1801
|
|
|
1713
1802
|
|
|
1714
|
-
|
|
1803
|
+
123</pre>
|
|
1715
1804
|
</td>
|
|
1716
1805
|
<td>
|
|
1717
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1806
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 123</span>
|
|
1718
1807
|
|
|
1719
1808
|
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_zero'>zero</span><span class='lparen'>(</span><span class='id identifier rubyid_currency'>currency</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Registry.html" title="Mint::Registry (module)">Registry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_zero_for'><span class='object_link'><a href="Registry.html#zero_for-class_method" title="Mint::Registry.zero_for (method)">zero_for</a></span></span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Mint::Currency (class)">Currency</a></span></span><span class='period'>.</span><span class='id identifier rubyid_resolve!'><span class='object_link'><a href="#resolve!-class_method" title="Mint::Currency.resolve! (method)">resolve!</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_currency'>currency</span><span class='rparen'>)</span><span class='rparen'>)</span></pre>
|
|
1720
1809
|
</td>
|
|
@@ -1731,7 +1820,7 @@ for discounts, totals, or placeholders.</p>
|
|
|
1731
1820
|
<div class="method_details first">
|
|
1732
1821
|
<h3 class="signature first" id="inspect-instance_method">
|
|
1733
1822
|
|
|
1734
|
-
#<strong>inspect</strong> ⇒ <tt>String</tt>
|
|
1823
|
+
#<strong>inspect</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>
|
|
1735
1824
|
|
|
1736
1825
|
|
|
1737
1826
|
|
|
@@ -1751,7 +1840,7 @@ for discounts, totals, or placeholders.</p>
|
|
|
1751
1840
|
<li>
|
|
1752
1841
|
|
|
1753
1842
|
|
|
1754
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1843
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
1755
1844
|
|
|
1756
1845
|
|
|
1757
1846
|
|
|
@@ -1768,10 +1857,10 @@ for discounts, totals, or placeholders.</p>
|
|
|
1768
1857
|
<pre class="lines">
|
|
1769
1858
|
|
|
1770
1859
|
|
|
1771
|
-
|
|
1860
|
+
38</pre>
|
|
1772
1861
|
</td>
|
|
1773
1862
|
<td>
|
|
1774
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1863
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 38</span>
|
|
1775
1864
|
|
|
1776
1865
|
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span> <span class='op'>=</span> <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='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>)></span><span class='tstring_end'>"</span></span></pre>
|
|
1777
1866
|
</td>
|
|
@@ -1819,10 +1908,10 @@ for discounts, totals, or placeholders.</p>
|
|
|
1819
1908
|
<pre class="lines">
|
|
1820
1909
|
|
|
1821
1910
|
|
|
1822
|
-
|
|
1911
|
+
41</pre>
|
|
1823
1912
|
</td>
|
|
1824
1913
|
<td>
|
|
1825
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1914
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 41</span>
|
|
1826
1915
|
|
|
1827
1916
|
<span class='kw'>def</span> <span class='id identifier rubyid_minimum_amount'>minimum_amount</span> <span class='op'>=</span> <span class='const'>Rational</span><span class='lparen'>(</span><span class='int'>1</span><span class='comma'>,</span> <span class='id identifier rubyid_fractional_multiplier'>fractional_multiplier</span><span class='rparen'>)</span></pre>
|
|
1828
1917
|
</td>
|
|
@@ -1858,10 +1947,10 @@ for discounts, totals, or placeholders.</p>
|
|
|
1858
1947
|
<pre class="lines">
|
|
1859
1948
|
|
|
1860
1949
|
|
|
1861
|
-
|
|
1950
|
+
46</pre>
|
|
1862
1951
|
</td>
|
|
1863
1952
|
<td>
|
|
1864
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
1953
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 46</span>
|
|
1865
1954
|
|
|
1866
1955
|
<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> <span class='op'>=</span> <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></pre>
|
|
1867
1956
|
</td>
|
|
@@ -1917,10 +2006,10 @@ for discounts, totals, or placeholders.</p>
|
|
|
1917
2006
|
<pre class="lines">
|
|
1918
2007
|
|
|
1919
2008
|
|
|
1920
|
-
|
|
2009
|
+
53</pre>
|
|
1921
2010
|
</td>
|
|
1922
2011
|
<td>
|
|
1923
|
-
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line
|
|
2012
|
+
<pre class="code"><span class="info file"># File 'lib/minting/currency/currency.rb', line 53</span>
|
|
1924
2013
|
|
|
1925
2014
|
<span class='kw'>def</span> <span class='id identifier rubyid_zero'>zero</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Registry.html" title="Mint::Registry (module)">Registry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_zero_for'><span class='object_link'><a href="Registry.html#zero_for-class_method" title="Mint::Registry.zero_for (method)">zero_for</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span></pre>
|
|
1926
2015
|
</td>
|
|
@@ -1933,7 +2022,7 @@ for discounts, totals, or placeholders.</p>
|
|
|
1933
2022
|
</div>
|
|
1934
2023
|
|
|
1935
2024
|
<div id="footer">
|
|
1936
|
-
Generated on
|
|
2025
|
+
Generated on Wed Jul 1 01:11:53 2026 by
|
|
1937
2026
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1938
2027
|
0.9.44 (ruby-4.0.5).
|
|
1939
2028
|
</div>
|