Doubts about an example in Poignant Guide

Hi,
I’m reading “Why’s guide to ruby” and I have two doubts about the
example of Endertromb, mindreaders, etc.

Firstly, He creates the class “MindReader” where he uses
“EnderTromb::scan_for_sentence”. However, there is no EnderTromb class
in the manual.

Even though I can skip that part and initialize the sentence “manually”,
I’ve found that he uses a mind.read method. That is, a “read” method on
a string. And it gives me back an error.

Has anybody come across these errors? If so, I will be pleased to know
how can I solve them :slight_smile:

Thanks
PT: And thanks for being a vivid forum! You’re really really useful for
people starting like me!

Yes, I guess you are completely right :slight_smile: I was trying to give life to
EnderTromb planet myself and I was getting crazy :slight_smile:

On Jul 21, 2006, at 12:35 PM, Damaris F. wrote:

I’ve found that he uses a mind.read method. That is, a “read”
method on
a string. And it gives me back an error.

Has anybody come across these errors? If so, I will be pleased to know
how can I solve them :slight_smile:

Thanks
PT: And thanks for being a vivid forum! You’re really really useful
for
people starting like me!

_why may have something to say here, but I’m not sure why you’re
saying mind is a string. I don’t see the actual type of mind defined
anywhere. As for EnderTromb, it’s included from endertromb.rb, it
says. So it’s defined there.

I think part of it is that you have to relax a little and give into
the programming-as-language idea. You can dig down if you have too,
but for an example like this, you don’t have to. You know what
mind.read does just by looking at it. It reads minds of course!
How? Leave that up to the author :slight_smile:
-Mat

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs