This small exercice is just meant to challenge new FidMe appliants.
- Clone this repo (do not fork it)
- Install ruby if you haven't (any version will do fine)
- Run
ruby main.rb --loyalty_card_id=1 --user_id=5
We are building a wallet app. Let's call it FidMe !
Our wallet app is made of a few identities: For now we have users and loyalty cards.
Users can own loyalty cards. Users can gain rewards (points) for a given card.
We already have a few data at our diposal (see input.json
) and a main program (see main.rb
)
The problem is... the command ruby main.rb --loyalty_card_id=1 --user_id=5
always returns the same value !!
Write code that reproduces the output of the command, but is actually working with input.json
data.
- Take your time :)
- Produce what your consider to be clean code.
- Use object oriented programming
- Do not try to overthink it
- Use any library or tool that you want (except Rails ;) ).
- You can create files and folders if you want
- You can (and we would love if you do) write test (but it is ok if you are not confident with it).