Created
May 6, 2015 08:25
-
-
Save letz/fc5eefed82ebad75e77b to your computer and use it in GitHub Desktop.
Create class dynamically
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
# Create Object dynamically | |
klass = Object.const_set 'DynamicWorker', Class.new | |
klass.redefine_method(:perform) { |*args| } | |
klass.include Sidekiq::Worker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment