Skip to content

Instantly share code, notes, and snippets.

@kke
Created May 3, 2013 12:40
Show Gist options
  • Select an option

  • Save kke/5508872 to your computer and use it in GitHub Desktop.

Select an option

Save kke/5508872 to your computer and use it in GitHub Desktop.
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