Class: Integer

Inherits:
Object show all
Defined in:
lib/core_extensions/integer.rb

Instance Method Summary collapse

Instance Method Details

#commifyObject



2
3
4
# File 'lib/core_extensions/integer.rb', line 2

def commify
  self.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,')
end