Created
April 23, 2012 12:17
-
-
Save ruprict/2470572 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
class Mammal | |
def self.inherited(child_class) | |
puts "Hey I'm going to be called when I'm inherited" | |
super | |
end | |
end | |
class Dog < Mammal | |
end | |
# | |
=> "Hey I'm going to be called when I'm inherited" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment