Skip to content

TGOlson/integer_expansion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Ruby Gem for adding more methods to the Integer Class in Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages