you selected in a selectable window? I mean, I created a menu that would list all the hash keys and doesn't show their values.
It wasn't necessary to show the values, I just wanted to let the player delete a hash key without typing a specific id number, an id that should be equal to the hash key he wants to delete. So let's say the player selects the third key like in this example:
______
| ID 1 |
| ID 2 |
| ID 3 | <<
| ID 4 |
______
In this case the 3rd key should be deleted. I know about the delete method: some_hash.delete(3), but the player is not supposed to type any number so the program should look for one on its own.
How should I delete a single key then?
It wasn't necessary to show the values, I just wanted to let the player delete a hash key without typing a specific id number, an id that should be equal to the hash key he wants to delete. So let's say the player selects the third key like in this example:
______
| ID 1 |
| ID 2 |
| ID 3 | <<
| ID 4 |
______
In this case the 3rd key should be deleted. I know about the delete method: some_hash.delete(3), but the player is not supposed to type any number so the program should look for one on its own.
How should I delete a single key then?