Last active
October 24, 2016 07:15
-
-
Save MaxPleaner/eb6c3b8b41b482100e8c2463a0b351b7 to your computer and use it in GitHub Desktop.
example of using class exec
This file contains hidden or 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
# When including Sounds, some other modules/constants are loaded as well | |
module Sounds | |
def self.included(base) | |
super | |
base.class_exec do | |
# these are all defined elsewhere | |
include Sounds::Introduction | |
include Sounds::Base | |
include Sounds::Loader | |
include Sounds::Effects | |
include Sounds::SpecialCommands | |
include Sounds::Arpeggiator | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment