Skip to content

Instantly share code, notes, and snippets.

@letz
Created May 6, 2015 08:25
Show Gist options
  • Save letz/fc5eefed82ebad75e77b to your computer and use it in GitHub Desktop.
Save letz/fc5eefed82ebad75e77b to your computer and use it in GitHub Desktop.
Create class dynamically
# 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