Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miguelargentina/torc_ruby_coding_challlenge

Ruby Coding challenge for Torc
https://github.com/miguelargentina/torc_ruby_coding_challlenge

Last synced: 8 days ago
JSON representation

Ruby Coding challenge for Torc

Awesome Lists containing this project

README

        

This is a Ruby coding challenge proposed by Torc

The challenge is to process an array of items buyed by a customer and return the receipt, including base and import taxes when applicable.

```
Input 1:
2 book at 12.49
1 music CD at 14.99
1 chocolate bar at 0.85
```

```
Output 1:
2 book: 24.98
1 music CD: 16.49
1 chocolate bar: 0.85
Sales Taxes: 1.50
Total: 42.32
```

## Features
- The inputs are validated to control if it is in the correct format, if not, the program will return an error message leading the user to correct the part or parts of the input that don't comply with the program'
s needs.
- A help method is provided to guide the user through the input process.
- The program is divided in 2 classes: ReceiptGenerator and ReceiptItemPresenter.

## Built With
- Ruby 2.7.6
- Minitest

## Prerequisites
- Ruby 2.5.0 or higher

## Getting Started

- Open your terminal - Windows: `Win + R`, then type `cmd` | Mac: `Command + space`, then type `Terminal`
- Navigate to a directory of your choosing using the `cd` command
- Run this command in your OS terminal: `git clone [email protected]:MiguelArgentina/torc_ruby_coding_challlenge.git` to get a copy of the project.
- Navigate to the project's directory using the `cd` command
- To execute the tests, run `ruby receipt_generator_test.rb` in your terminal
- To execute the program, run `ruby receipt_generator.rb` in your terminal

## Author

### Miguel Gomez

Miguel Gomez Profile Picture

* GitHub: [@MiguelArgentina](https://github.com/MiguelArgentina)
* twitter - https://twitter.com/Qete_arg
* LinkedIn - https://www.linkedin.com/in/miguelricardogomez/