B
Bob Archer
Hello,
=20
I want to set a constant to be the value from an env variable or if that
is not there set it to the current directory.
=20
So, I am doing this:
=20
WORKINGDIR =3D ENV['CCNetWorkingDirectory'] ? =
ENV['CCNetWorkingDirectory']
: "."
=20
But it doesn't seem very Ruby/DRY like.
=20
Is there a better way to do this?
=20
Sorry for the basic question... but 5 chapters into Why's guide and I
haven't got to a solution yet.
=20
BOb
=20
=20
I want to set a constant to be the value from an env variable or if that
is not there set it to the current directory.
=20
So, I am doing this:
=20
WORKINGDIR =3D ENV['CCNetWorkingDirectory'] ? =
ENV['CCNetWorkingDirectory']
: "."
=20
But it doesn't seem very Ruby/DRY like.
=20
Is there a better way to do this?
=20
Sorry for the basic question... but 5 chapters into Why's guide and I
haven't got to a solution yet.
=20
BOb
=20