Understanding Our Goal

Our goal is to write a program that can perform calculations. Some people might call it a calculator.

We have an incredible vision of what this calculator will one day become: a cloud-based service that runs on mobile phones, desktops, and browsers, uniting the world with the opportunity of ubiquitous mathematical operations. We’re pragmatic businesspeople, though, so the first release of our program has to be as simple as possible. The first release will be a command-line program, implemented as a Ruby script. It will take input containing the calculation to be done and display the result at the command prompt.

So, for example, if the input file looks like this:

 
2+2

then the output would be 4.

Similarly, if the ...

Get The Cucumber Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.