Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zymtx5g79k/86c520b600505230eab8ccccb458f9ab to your computer and use it in GitHub Desktop.
Save zymtx5g79k/86c520b600505230eab8ccccb458f9ab to your computer and use it in GitHub Desktop.
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