Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thisismydesign/2e1de01e51464e36f588fa0a015d4bee to your computer and use it in GitHub Desktop.
Save thisismydesign/2e1de01e51464e36f588fa0a015d4bee to your computer and use it in GitHub Desktop.
Ruby: how to use self.included meaningfully, create class methods upon include
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