lib/monetize.rb in monetize-1.12.0 vs lib/monetize.rb in monetize-1.13.0
- old
+ new
@@ -18,9 +18,15 @@
# decimals, and to ignore thousands separators. In some corner cases,
# though, it will try to determine the correct separator by itself. Set this
# to true to enforce the delimiters set in the currency all the time.
attr_accessor :enforce_currency_delimiters
+
+ # Where this set to true, the behavior for parsing thousands separators is changed to
+ # expect that eg. €10.000 is EUR 10 000 and not EUR 10.000 - it's incredibly rare when parsing
+ # human text that we're dealing with fractions of cents.
+ attr_accessor :expect_whole_subunits
+
def parse(input, currency = Money.default_currency, options = {})
parse! input, currency, options
rescue Error
nil
end