Last active
May 5, 2020 14:05
-
-
Save briu/6cf6e04069c17c721fc5dc985872e654 to your computer and use it in GitHub Desktop.
extend module B when including module M
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 M | |
def test | |
end | |
module B | |
def hard_test | |
puts "hey, bro" | |
end | |
end | |
end | |
class AmazingM | |
include M | |
end | |
AmazingM.hard_test | |
=> "hey, bro" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment