New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

roman-numeral

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roman-numeral

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

roman-numeral

Convert roman numeral to decimal number or viceversa.

Installation

To use the roman numerals gem, you need to add this line to your Gemfile

gem 'roman-numeral'

And then execute:

$ bundle

Or install it yourself as:

$ gem install roman-numeral

##Usage In irb console:

Convert roman numeral to decimal number

>> require 'roman-numeral'

>> r = RomanNumeral.new("IV")
>> r.to_decimal
=> 4

>> r = RomanNumeral.new("IVI")
>> r.to_decimal
=> "Invalid numeral IVI"

Convert decimal number to roman numeral

>> d = RomanNumeral.new(17)
>> d.to_roman
=> "XVII"

>> r = RomanNumeral.new(10.23)
>> r.to_roman
=> "Invalid numeral 10.23"

###Basic working principles of roman-rumeral In order to convert roman numeral to decimal nuber, it works like a State Machine.

FAQs

Package last updated on 29 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc