Solution by Ruby with TDD
BDD with cucumber