Class: String

Inherits:
Object show all
Defined in:
lib/commercebank/monkey.rb

Instance Method Summary collapse

Instance Method Details

#commifyObject



62
63
64
# File 'lib/commercebank/monkey.rb', line 62

def commify
  reverse.gsub(/(\d\d\d)(?=\d)/, '\1,').reverse
end