Simple Class Question

S

Stefano Crocco

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top