Last active
July 30, 2018 14:12
-
-
Save jozr/f35b1c43eded33b5a3083707b0c45b71 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
def descendants_mapper(klass) | |
klass.subclasses.reduce({}) { |memo, subclass| | |
memo[subclass] = descendants_mapper(subclass); memo | |
} | |
end | |
{ MasterClass => descendants_mapper(MasterClass) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment