Skip to content

Instantly share code, notes, and snippets.

@inre
Created September 19, 2012 06:37
Show Gist options
  • Save inre/3748030 to your computer and use it in GitHub Desktop.
Save inre/3748030 to your computer and use it in GitHub Desktop.
Multi include
module Module1
end
module Module2
end
module Module3
end
class MyClass
includes Module1, Module2, Module3
end
class Class
private
def includes(*modules)
modules.each(&method(:include))
nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment