This gem demonstrates the calculation of sales taxes for various kinds of line items on a receipt.
- Ruby 2.1.2+
Install the gem using:
$ gem install panier
After installation, run the CLI by executing:
$ panier
You will then be prompted for input.
Welcome to Panier.
Press Ctrl+C to exit.
Enter some sample input, then leave a blank line to proceed.
Copy an example and paste it into the console.
Quantity, Product, Price
1, book, 12.49
1, music CD, 14.99
1, chocolate bar, 0.85
Leave a blank line to generate a receipt.
1, book, 12.49
1, music CD, 16.49
1, chocolate bar, 0.85
Sales Taxes: 1.50
Total: 29.83
Check out the source code:
$ git clone git@github.com:bc-luke/panier.git
$ cd panier
And then execute:
$ bundle install
Finally, to run the test suite:
$ rake