Markup Calculator Implementation in Ruby