class Numeric

Commify numbers.

Public Instance Methods

commify() click to toggle source
# File lib/BioDSL.rb, line 32
def commify
  to_s.gsub(/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/, '\1,')
end