Simple Class Question

Why can’t I do this?

class Service
Request.new
end

class Request

end

Alle martedì 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,
before class Request is defined.

Stefano