-
-
Save dbussink/e0992719d4ee7ff32bec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ObjectSpace | |
class << self | |
# Returns all the classes in the object space. | |
def classes | |
ObjectSpace.each_object(Module).select do |klass| | |
Class.class_eval { klass } rescue false | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment