A
Asfand Yar Qazi
Hi,
I want to be able to do the following:
lots of Ruby files are in a directory, each containing stuff and a
method 'init_file'. I want to be able to 'require' each file, and
then call the 'init_file' method within that file.
Each file will have its own 'init_file' method, so I can't just do a:
require 'file'
init_file
because the init_file method will have been defined before hand.
Is it possible, like in Perl, for an included file to return a value?
I want to be able to do the following:
lots of Ruby files are in a directory, each containing stuff and a
method 'init_file'. I want to be able to 'require' each file, and
then call the 'init_file' method within that file.
Each file will have its own 'init_file' method, so I can't just do a:
require 'file'
init_file
because the init_file method will have been defined before hand.
Is it possible, like in Perl, for an included file to return a value?