Reputation: 119
Ex41
in Learn Ruby the Hard Way
is giving me difficulties.
(Namely the "A Reading Test" part.)
http://learnrubythehardway.org/book/ex41.html
I found qestions about that one here and around the web, but those were regarding other parts of the exercise. I even tried looking at the same code in Python to see if i can make something out based on the two, but I don't even know how to get started with the exercise.
The author says:
Run this script and try to translate the "object-oriented phrases" into English translations. You should see that the PHRASES dict has both forms and you just have to enter the correct one.
I know i'm supposed to make that code run. And according to the author it's a simple piece of code. Sure, whatever, I'm still stuck. I still don't know what to do with it.
What's up with the long string stored in PHRASES
?
Do I edit that part, or do I leave it as is and add new lines?
Do I change the ###
@@@
and ***
parts? If I don't, the class definition will look like
class ###()
code
end
which of course does not work. If I do change them, what do I change them to?
The more time I spend on this, the more confused I get. I've been stuck for days, and it's starting to feel like i even forgot stuff I know that I know.
If someone could point me in the right direction, that would be greatly appreciated.
Upvotes: 0
Views: 257
Reputation: 369428
No, you are not supposed to "make that code run". You are simply supposed to run it. It's a simple script which replaces the flash cards, by asking you questions and checking your answers.
The exercise is not making the script run, it's running the script and answering its questions.
Upvotes: 1