-
-
Save kotay/8933130 to your computer and use it in GitHub Desktop.
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
module Plugin1 | |
hello("hello") | |
end | |
module PluginContainer | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
include Plugin1 | |
end | |
end | |
class Greeter | |
def self.hello(name) | |
p "hello #{name}" | |
end | |
include PluginContainer | |
hello("from greeter") | |
end | |
# undefined method `hello' for Plugin1:Module (NoMethodError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment