first version in ruby, very simple

my first implementation