This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_ extPart_001_01C12105.FDA66C60
Content-Type: text/plain;
charset so-8859-1"
> -----Original Message-----
> From: jobeicus / hotmail.com [mailto:jobeicus / hotmail.com]
> Sent: Thursday, August 09, 2001 3:02 PM
> To: ruby-talk / ruby-lang.org
> Subject: [ruby-talk:19444] question about ::
>
>
> if i have:
>
> class Foo
> def initialize()
> end
>
> def test()
> end
> end
>
> Can someone explain how calling Foo::test works? initialize will
> never get called, right? so Foo::test is limited in scope to itself?
> can someone just run through an explanation of what's going on?
To use it test, you would have to:
1. instantiate the Foo object by calling new which automatically call
initialize
2. call test on the created object
In short
Foo.new.test
Christophe
------_ extPart_001_01C12105.FDA66C60
Content-Type: text/html;
charset so-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV
ontent-Type" CONTENT ext/html; charset o-8859-1">
<META NAME enerator" CONTENT S Exchange Server version 5.5.2653.12">
<TITLE>RE: [ruby-talk:19444] question about ::</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE > -----Original Message-----</FONT>
<BR><FONT SIZE > From: jobeicus / hotmail.com [<A HREF ailto:jobeicus / hotmail.com">mailto:jobeicus / hotmail.com</A>]</FONT>
<BR><FONT SIZE > Sent: Thursday, August 09, 2001 3:02 PM</FONT>
<BR><FONT SIZE > To: ruby-talk / ruby-lang.org</FONT>
<BR><FONT SIZE > Subject: [ruby-talk:19444] question about ::</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > if i have:</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > class Foo</FONT>
<BR><FONT SIZE > def initialize()</FONT>
<BR><FONT SIZE > end</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > def test()</FONT>
<BR><FONT SIZE > end</FONT>
<BR><FONT SIZE > end</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > Can someone explain how calling Foo::test works? initialize will</FONT>
<BR><FONT SIZE > never get called, right? so Foo::test is limited in scope to itself? </FONT>
<BR><FONT SIZE > can someone just run through an explanation of what's going on?</FONT>
</P>
<P><FONT SIZE To use it test, you would have to:</FONT>
<BR><FONT SIZE 1. instantiate the Foo object by calling new which automatically call initialize </FONT>
<BR><FONT SIZE 2. call test on the created object</FONT>
</P>
<P><FONT SIZE In short </FONT>
</P>
<P><FONT SIZE Foo.new.test</FONT>
</P>
<P><FONT SIZE Christophe</FONT>
</P>
</BODY>
</HTML>
------_ extPart_001_01C12105.FDA66C60--