Ruby exercise for program paradigms 2014/15