Created
August 21, 2018 12:43
-
-
Save thisismydesign/2e1de01e51464e36f588fa0a015d4bee to your computer and use it in GitHub Desktop.
Ruby: how to use self.included meaningfully, create class methods upon include
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
def self.included(base) | |
base.extend(self) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment