# File lib/money/currency.rb, line 100 def decimal_places if subunit_to_unit == 1 0 elsif subunit_to_unit % 10 == 0 Math.log10(subunit_to_unit).to_s.to_i else Math.log10(subunit_to_unit).to_s.to_i+1 end end