Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/bblib/core/util/roman.rb,
lib/bblib/core/util/number.rb
Instance Method Summary collapse
- #spell_out ⇒ Object
-
#to_delimited_s(delim = ',') ⇒ Object
Convert this integer into a string with every three digits separated by a delimiter.
- #to_roman ⇒ Object
Instance Method Details
#spell_out ⇒ Object
97 98 99 |
# File 'lib/bblib/core/util/number.rb', line 97 def spell_out BBLib.number_spelled_out(self) end |
#to_delimited_s(delim = ',') ⇒ Object
Convert this integer into a string with every three digits separated by a delimiter
93 94 95 |
# File 'lib/bblib/core/util/number.rb', line 93 def to_delimited_s(delim = ',') self.to_s.reverse.gsub(/(\d{3})/, "\\1#{delim}").reverse.uncapsulate(',') end |