Sample code of Design Patterns in Ruby