iamkhushbajwa / nummy-word

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nummy Word

A technical test for a company in London.

Requirements

Write a Ruby script which translate numbers into English words. It should work like this:

$ ruby num2english.rb 1
=> one

$ ruby num2english.rb 11
=> eleven

$ ruby num2english.rb 1001
=> one thousand one

Please implement it step by step using RSpec, in multiple git commits as you'd normally do in any project, following TDD. Also, don't hesitate to use OOP.

More details:

  • Only positive numbers
  • Only numbers of 4 figures as maximum, so from 0 to 9999
  • Only integers

About


Languages

Language:Ruby 100.0%