Class: String

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

Overview

Magick

Instance Method Summary collapse

Instance Method Details

#commify(delimiter = ',') ⇒ Object


1171
1172
1173
# File 'lib/gruff/base.rb', line 1171

def commify(delimiter=',')
  self.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}")
end