Created
May 3, 2013 12:40
-
-
Save kke/5508872 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class Zuper | |
| def self.inherited(child) | |
| puts "Zuper says: #{child}" | |
| end | |
| end | |
| class KidOne < Zuper | |
| end | |
| # Zuper says: KidOne | |
| Object.const_set(:KidTwo, Class.new(Zuper)) | |
| # Zuper says: #<Class:0x7f06f904b468> | |
| # how do we get it to say KidTwo? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment