Skip to content

Instantly share code, notes, and snippets.

@MaxPleaner
Last active October 24, 2016 07:15
Show Gist options
  • Save MaxPleaner/eb6c3b8b41b482100e8c2463a0b351b7 to your computer and use it in GitHub Desktop.
Save MaxPleaner/eb6c3b8b41b482100e8c2463a0b351b7 to your computer and use it in GitHub Desktop.
example of using class exec
# 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