Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

License

Notifications You must be signed in to change notification settings

wuletawwonte/numerify

Open more actions menu

Repository files navigation

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.

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.