Applying Design Patterns in Ruby