Prev: How to print out all of an object's instance variables?
Next: Read text file and set the values in the Variables
From: Maciej Szatanik on 19 May 2010 04:43 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. -- Posted via http://www.ruby-forum.com/.
From: Robert Klemme on 19 May 2010 07:20
2010/5/19 Maciej Szatanik <mszatanik(a)gmail.com>: > 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 -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ |