Skip to content

Instantly share code, notes, and snippets.

@mikecmpbll
Created February 11, 2014 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mikecmpbll/8933104 to your computer and use it in GitHub Desktop.
Save mikecmpbll/8933104 to your computer and use it in GitHub Desktop.
module Plugin1
def some_method
puts "ha!"
end
end
module Plugin2
def some_method_again
puts "hrn..."
end
end
module PluginContainer
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
include Plugin1, Plugin2
end
end
class Wooooo
include PluginContainer
end
Wooooo.some_method
=> "ha!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment