A ruby gem to convert numbers into English words and vice versa.
Ruby
Latest commit dc0ce29 Oct 18, 2016 @markburns update travis.yml
Permalink
Failed to load latest commit information.
bin refactor Nov 30, 2015
lib bump version Oct 19, 2016
spec
.codeclimate.yml ignore config files on codeclimate Nov 30, 2015
.gitignore update gitignore Nov 29, 2015
.rspec
.rubocop.yml add .codeclimate.yml and .rubocop.yml [ci skip] Nov 29, 2015
.travis.yml update travis.yml Oct 19, 2016
Gemfile
LICENSE.txt replacing old gem with refactored bundler created gem Jan 17, 2013
README.md
Rakefile replacing old gem with refactored bundler created gem Jan 17, 2013
numbers_in_words.gemspec

README.md

Build Status Dependency Status Code Climate Test Coverage Gem Version License Badges

Installation

gem 'numbers_in_words'

Usage

require 'numbers_in_words'

NumbersInWords.in_words(112)
#=> one hundred and twelve

NumbersInWords.in_numbers("one googol")
#=>10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

NumbersInWords.in_numbers("Seventy million, five-hundred and fifty six thousand point eight nine three")
#=> 70556000.893

NumbersInWords.in_numbers("nineteen sixty five")
#=> 1965

Monkey patch version

require 'numbers_in_words'
require 'numbers_in_words/duck_punch'
112.in_words
#=> one hundred and twelve

"one googol".in_numbers
#=>10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

"Seventy million, five-hundred and fifty six thousand point eight nine three".in_numbers
#=> 70556000.893