Training GoF pattern in ruby.