Skip to content

Instantly share code, notes, and snippets.

@briu
Last active May 5, 2020 14:05
Show Gist options
  • Save briu/6cf6e04069c17c721fc5dc985872e654 to your computer and use it in GitHub Desktop.
Save briu/6cf6e04069c17c721fc5dc985872e654 to your computer and use it in GitHub Desktop.
extend module B when including module M
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