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



1185
1186
1187
# File 'lib/gruff/base.rb', line 1185

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