Method: Codebot::Formatter#format_number
- Defined in:
- lib/codebot/formatter.rb
#format_number(num, singular = nil, plural = nil) ⇒ String
Formats a number.
85 86 87 88 |
# File 'lib/codebot/formatter.rb', line 85 def format_number(num, singular = nil, plural = nil) bold_num = ::Cinch::Formatting.format(:bold, num.to_s) (bold_num + ' ' + (num == 1 ? singular : plural).to_s).strip end |