No commit activity in last 3 years
No release in over 3 years
1999#to_roman, 1999#to_old_roman, 4#fact, 1999#to_english, 1999#add_commas
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

integer_expansion

Creates additional methods for the Integer class in Ruby.

Run to Install:

gem install integer_expansion

Currently includes:

  • Integer#to_roman
    • Returns any integer (up to 3999) in Roman numerals.
    • 1999.to_roman == 'MCMXCIX'
  • Integer#to_old_roman
    • Returns any integer (up to 3999) in old style Roman numerals (VIIII as opposed to IV in new Roman).
    • 1999.to_old_roman == 'MDCCCCLXXXXVIIII'
  • Integer#fact
    • Returns any integer factorial.
    • 4.fact == 24
  • Integer#to_english
  • Integer#add_commas
    • Returns an integer as a string with commas.
    • 1999.add_commas == '1,999'
  • test.rb
    • Quick test that returns an array of true/false responses based on methods.
  • Error checking for incorrect inputs.

To later include:

  • Additional ArgumentErrors for bad inputs.

More Documentation: