-
-
Save meagar/0f8379ec706949594e76f9c91c7d6ec1 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 Base | |
def self.friendly_name | |
"Default Friendly Name" | |
end | |
end | |
class Child1 < Base | |
end | |
class Child2 < Base | |
def self.friendly_name | |
"A more specific friendly name" | |
end | |
end | |
p Child1.friendly_name # Default Friendly Name | |
p Child2.friendly_name # A more specific friendly name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment