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

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top