When I first got into Ruby awhile back I found that I wanted to do something like I used to in Java:
public static final String BLUE = “blue”;
But darned if I could get the internet to tell me how, so here I am giving back to the community:
MASS_OF_EARTH = 5.98e24
in some other file:
or you can:
This being Ruby you can, of course, redefine a constant. But you will get a stern warning.