Design patterns in Ruby