Created
June 21, 2015 20:51
-
-
Save dangjlin/1ad0150e2b95b59a2e38 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 SecondLevelModule | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
def second_level_instance_method; 'ok'; end | |
module ClassMethods | |
def second_level_class_method; 'ok'; end | |
end | |
end | |
module FirstLevelModule | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
def first_level_instance_method; 'ok'; end | |
module ClassMethods | |
def first_level_class_method; 'ok'; end | |
end | |
include SecondLevelModule | |
end | |
class BaseClass | |
include FirstLevelModule | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment