constants() public

Returns an array of the names of all constants defined in the system. This list includes the names of all modules and classes.

p Module.constants.sort[1..5]

produces:

["ARGV", "ArgumentError", "Array", "Bignum", "Binding"]
Show source
Register or log in to add new notes.