Project

numerify

0.0
There's a lot of open issues
An extraordinary Ruby gem designed to effortlessly convert numbers between Arabic and various world languages, including Geez, Chinese, Greek, and many more.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Numerify

A Ruby gem designed to effortlessly convert numbers between Arabic and various world languages, including Geez, Roman, and Chineese.

Installation

$ gem install numerify

Usage

These gem provides two approaches for converting numerals. The first is using Numerify.convert method as shown below.

> require 'numerify'
=> true
> Numerify.convert 123
=> "፻፳፫"
> Numerify.convert(324, :roman)
=> "CCCXXIV"

The second method utilizes monkey patching, to extend the String and Integer class of Ruby. With this approach, you can directly call the convert method on a string or an integer object.

> require 'numerify'
=> true
> "123".convert
=> "፻፳፫"
> 325.convert(:roman)
=> "CCCXXIV"

The list of numerals supported by this gem

    geez: Geez,
    roman: Roman,
    chinese: Chinese,
    thai: Thai,
    bengali: Bengali,
    devanagari: Devanagari,
    gujarati: Gujarati,
    gurmukhi: Gurmukhi,
    kannada: Kannada,
    khmer: Khmer,
    lao: Lao,
    malayalam: Malayalam,
    myanmar: Myanmar 

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wuletawwonte/numerify.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Numerify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.