Skip to content

Instantly share code, notes, and snippets.

@sxross
Created October 21, 2012 06:14
Show Gist options
  • Save sxross/3926105 to your computer and use it in GitHub Desktop.
Save sxross/3926105 to your computer and use it in GitHub Desktop.
A Template for Building a Mixin
module MixinTemplate
def self.included(base)
base.extend(ClassMethods)
base.instance_variable_set('@my_data', [])
end
module ClassMethods
...
end
def any_instance_method
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment