[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Simple Class Question

eggie5

11/20/2007 7:53:00 AM

Why can't I do this?

class Service
Request.new
end

class Request

end






1 Answer

Stefano Crocco

11/20/2007 7:58:00 AM

0

Alle marted=EC 20 novembre 2007, eggie5 ha scritto:
> Why can't I do this?
>
> class Service
> Request.new
> end
>
> class Request
>
> end

Because the body of the class is executed as soon as it is read, that is,=20
before class Request is defined.

Stefano