Design pattern study with Ruby