Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/extentions.rb

Instance Method Summary collapse

Instance Method Details

#formatObject



33
34
35
# File 'lib/extentions.rb', line 33

def format
  to_s.gsub(/(\d)(?=(\d{3})+(?!\d))/, '\1,')
end