Kata String Calculator in Ruby