Skip to content

Instantly share code, notes, and snippets.

@jvans1
Created June 22, 2014 00:03
Show Gist options
  • Save jvans1/e0b75241297e8108fe4c to your computer and use it in GitHub Desktop.
Save jvans1/e0b75241297e8108fe4c to your computer and use it in GitHub Desktop.
module MyConcern
def shared_method
#do something with method_specific_to_class
end
def method_specific_to_class
raise NotImplementedError.new
end
end
class MyClass
include MyConcern
include InstanceMethods
end
module MyClass::InstanceMethods
def method_specific_to_class
#override concerns method
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment