Hello Rubyists, I've been working with this scenario:
* I want to set a constant to true to enable test mode
* otherwise, if the constant does not appear, enable normal mode
Rather than have TEST_MODE=true and TEST_MODE=off, I want there to be
*only* TEST_MODE=true, or nothing at all.
The closest thing i can find is Object.defined? , but this doesn't get us
all the way. So I'm considering monkeypatching Object like so:
return eval(const) == true
Any thoughts ? Thanks
A musician must make music, an artist must paint, a poet must write, if he
is to be ultimately at peace with himself.
- Abraham Maslow