Design Pattern Exercise in Ruby.