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.