Skip to content

Instantly share code, notes, and snippets.

@meagar meagar/62193858.rb Secret

Last active Jun 4, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.