kiytang / inspect_override

Week 4 Exercise @Makers-Academy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fixunum_override

Makers Academy Week 4 Exercise

###Aim

To override the method "inspect" so that it returns its word equivalent for numbers ranging 0 to 9. For all numbers outside of this range, it simply outputs its numerical number as a string.

###Example:

  • 0.inspect => "zero"
  • 1.inspect => "one"
  • 9.inspect => "nine"
  • 10.inspect => "10"
  • 11.inspect => "11"

###Other details

  • In my version I opted to use Italian word equivalents for the ranges, as part of my continued learnig of the Italian language.

  • The test was set by Evgeny Shadnev @shadnev

About

Week 4 Exercise @Makers-Academy


Languages

Language:Ruby 100.0%