saudaziz@gmail.com
3/7/2006 7:38:00 PM
How can i access "myvariable" in the provided code from
Say constants.rb has the following code
Module
myvariable = 'foo'
end
And another file driver.rb has following code
require constants
class myclass < food
def busted
#how can i call 'myvariable' constant here?
end
end
Also, if you can tell me what exactly is the difference between require
and include, that would be great help. I don't see any clear
explanation anywhere for the above.