1
12 34
I want to pass about 10 variables to a "require"d file. My understanding
is that I need to use global variables. Is this correct?
I'm reluctant to change all the variables to global for fear of messing
up the methods in the script. I can of course define new global
variables equal to the local variable. Seems inelegant.
I guess my best option is to rework the require'd file as a method, but
my script is getting long and keeping the file separate makes sense,
particularly since it is creating the GUI, so is different from the
script function if I understand the MVC philosophy.
Is there a better way? FWIW I'm "require'ing a modified example.rb file
that is included in the Pashua app for creating a simple GUI for OS X.
<http://www.bluem.net/downloads/pashua_en/>
Thanks for info
PS The example file as a
Config = <<EOS
<bunch of code>
EOS
I can't find EOS in Ruby on Rails or PickAxe, so maybe I'm missing
something in how it's used.
is that I need to use global variables. Is this correct?
I'm reluctant to change all the variables to global for fear of messing
up the methods in the script. I can of course define new global
variables equal to the local variable. Seems inelegant.
I guess my best option is to rework the require'd file as a method, but
my script is getting long and keeping the file separate makes sense,
particularly since it is creating the GUI, so is different from the
script function if I understand the MVC philosophy.
Is there a better way? FWIW I'm "require'ing a modified example.rb file
that is included in the Pashua app for creating a simple GUI for OS X.
<http://www.bluem.net/downloads/pashua_en/>
Thanks for info
PS The example file as a
Config = <<EOS
<bunch of code>
EOS
I can't find EOS in Ruby on Rails or PickAxe, so maybe I'm missing
something in how it's used.