Template Method Pattern in Ruby