Abaco is a Ruby library for converting numbers into Italian words.
It was specifically developed for the generation of postal payment slips via our Bollettino gem. Initially, Abaco was part of the gem, then we decided to extract the functionality.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install abaco
Abaco extends the
Numeric class, so you can use with
15.to_italian # <= "quindici/00" 15.5.to_italian # <= "quindici/50"
You can also call the converter directly:
::.(15) # <= "quindici/00" ::.(15.5) # <= "quindici/50"
Presently, the biggest number Abaco can translate is 999.999.999.999. Since this library is mainly meant to be used for billing purposes, we didn't find it necessary to go beyond that limit.
If you're billing someone for one trillion, contact us right away: we'll be glad to help you! :)
- Fork it (https://github.com/interconn-isp/abaco/fork)
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
The Bollettino gem can be used with Abaco to generate Italian postal payment slips.
Abaco is developed and maintained by Alessandro Desantis.
Abaco is released under the MIT license.