check if a file is already required ?

M

Maciej Szatanik

hi,

I made a GUI in wxruby to run ruby/watir test cases/test sets. Framework
has numerous of modules and global variables, which i can't require on
the start of the application.

i figured out that i can just 'load' files, but there is a problem with
global variables. i can load most of files, tho i still have problems
with few others.

my question is can i, and i i can - how do it unerquire files or check
are they already required.

meanwhile i'll try to move global variables to other files, which i
already require.
 
R

Robert Klemme

2010/5/19 Maciej Szatanik said:
I made a GUI in wxruby to run ruby/watir test cases/test sets. Framework
has numerous of modules and global variables, which i can't require on
the start of the application.
Why?

i figured out that i can just 'load' files, but there is a problem with
global variables. i can load most of files, tho i still have problems
with few others.

What problems do you have?
my question is can i, and i i can - how do it unerquire files or check
are they already required.

require checks that for you and ensures that a file is loaded only once.
meanwhile i'll try to move global variables to other files, which i
already require.

I don't have a clear picture of your problem. Maybe refactoring
global constants into other files that are required helps?

Kind regards

robert
 

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
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top