Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/BioDSL.rb
Overview
Commify numbers.
Instance Method Summary collapse
Instance Method Details
#commify ⇒ Object
32 33 34 |
# File 'lib/BioDSL.rb', line 32 def commify to_s.gsub(/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/, '\1,') end |