Sebastian Hungerecker
12/12/2008 5:30:00 PM
No Where wrote:
> Is there a way to declare [methods] at the beginning so I can put them
> all at the end of the file?
No. The fact that you can't use methods before their definition isn't because
of a shortcoming of the interpreter and thus can't be "fixed" by forward
declaration like in C. You can't use a method before its definition in ruby
because in ruby method definitions happen at run-time not at parse-time. This
needs to be so in order to allow method redefinition.
HTH,
Sebastian
--
Jabber: sepp2k@jabber.org
ICQ: 205544826