Skip to content

Instantly share code, notes, and snippets.

@hoffm
Last active August 12, 2017 00:03
Show Gist options
  • Save hoffm/8fdb0d6fd843d06931b874357ad0e35c to your computer and use it in GitHub Desktop.
Save hoffm/8fdb0d6fd843d06931b874357ad0e35c to your computer and use it in GitHub Desktop.
class MyClass
def foo_via_method
foo_method
end
def foo_via_constant
FOO_CONSTANT
end
end
class SubClass < MyClass
FOO_CONSTANT = "foo"
def foo_method
FOO_CONSTANT
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment