-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Schulte
committed
Jan 22, 2016
1 parent
fe11468
commit ef68ab2
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# phonebook | ||
|
||
Your task is to write a phonebook application where users can either query for names or phone numbers. | ||
|
||
The phonebook consists of the following entries: | ||
|
||
- Alice, 0255334232 | ||
- Bob, 0434235235 | ||
- Franz, 095487963 | ||
- Else, 024654968 | ||
|
||
Every entry has a `name` and a `number`. | ||
|
||
The user is able to pass the name or phone number they're looking for via the command line: | ||
|
||
Look up the entry by its number: | ||
```bash | ||
$ ruby phonebook.rb 024654968 | ||
=> Else | ||
``` | ||
|
||
Look up the entry by its name: | ||
```bash | ||
$ ruby phonebook.rb Else | ||
=> 024654968 | ||
``` | ||
|
||
If the phonebook does not contain the requested entry, the following should happen: | ||
|
||
```bash | ||
$ ruby phonebook.rb Notthere | ||
=> No entry 'Notthere' found | ||
``` |