Class: NCore::BigMoney

Inherits:
BigDecimal
  • Object
show all
Defined in:
lib/ncore/attributes.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject



171
172
173
174
175
176
177
# File 'lib/ncore/attributes.rb', line 171

def to_s
  if (self % BigDecimal.new('0.01')) == 0
    '%.2f' % self
  else
    super
  end
end