Created
August 21, 2018 12:44
-
-
Save thisismydesign/6da17750450e93090c8e2996efcee155 to your computer and use it in GitHub Desktop.
Ruby: how to use self.included meaningfully, solution
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 CreateClassMethodsUponInclude | |
def self.included(base) | |
# does what we want | |
end | |
end | |
module MyModule | |
include CreateClassMethodsUponInclude | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment