Dear Ian,
I hope you'r doing well....France was cool but that's a different 
story. Here is an "Alex Question" for you.

OK, here the summary:
everything is an object in ruby (even classes that are sigleton of the 
class "Class")
the class "Object" is at the top of the entire structure
the class "Module" is an superclass of class "Class"
("Module's" superclass is "Object")
"Module" provides the instance method "name" that gives the name of the 
module instance.

if I create an instance of any class that particular instance has as 
superclass the class "Object"

Sending the message "type" to that instance we get a constant of the 
singelton Class (ex: "myString".type => The Class "String")

here is the last fact:
inheritance works in Ruby
----------------------------
That's BS on that entire thing:

example:

class Apple
 print ">>"+self.name.to_s  #"name" is instance method of Module
end

output: >> Apple

myApple=Apple.new
myApple.name  =>  ERROR!!

I ask why!

After all, the "klass" pointer tells the myApple instance that it is an 
instance of Apple. And, we remind us that the Apple class could use an 
instance method of its parent (mod#name)...So why then can't I use the 
name methode in the instance of Apple under all the fact presented at 
the top... I really would like to undestand what's going on...

PS

I have to show the pics form France. Perhaps we have same time to do 
that.

thank you for your help,
greetz,
alex

-----------------------------------------------------------------
To get off this list, send email to [EMAIL PROTECTED]
with Subject: unsubscribe
-----------------------------------------------------------------

Reply via email to