Module: NumberWords
- Defined in:
- lib/number_words.rb,
lib/number_words/version.rb
Defined Under Namespace
Classes: Base
Constant Summary collapse
- VERSION =
"0.0.1"
- @@handlers =
{ }
Class Method Summary collapse
Class Method Details
.add_handler(locale, handler) ⇒ Object
10 11 12 |
# File 'lib/number_words.rb', line 10 def self.add_handler locale, handler @@handlers[locale] = handler end |
.int_to_words(int, options = { }) ⇒ Object
6 7 8 |
# File 'lib/number_words.rb', line 6 def self.int_to_words int, ={ } @@handlers[I18n.locale.to_sym].int_to_words(int.to_i, ).strip end |