Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module M
module ClassMethods
def method_a
raise "should not execute method_a"
end
end
def self.included(base)
base.extend M::ClassMethods
end
end
class A
include M
end
class B < A
def self.method_b
"executed method_b"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment