method

const_get

v1_9_1_378 - Show latest stable - Class: Module
const_get(p1, p2 = v2)
public

Returns the value of the named constant in mod.

Math.const_get(:PI)   #=> 3.14159265358979

If the constant is not defined or is defined by the ancestors and inherit is false, NameError will be raised.