method

const_defined?

v1_8_7_330 - Show latest stable - Class: Module
const_defined?(p1)
public

Returns true if a constant with the given name is defined by mod.

Math.const_defined? "PI"   #=> true