Created
April 3, 2017 07:21
-
-
Save zymtx5g79k/86c520b600505230eab8ccccb458f9ab 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
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