1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Allow delay of any module class method

This commit is contained in:
Luismi Cavalle 2012-09-30 17:09:42 +01:00
parent 729321b1fe
commit 8657aea37a
2 changed files with 10 additions and 1 deletions

View file

@ -30,4 +30,4 @@ module Sidekiq
end end
end end
Class.send(:include, Sidekiq::Extensions::Klass) Module.send(:include, Sidekiq::Extensions::Klass)

View file

@ -63,5 +63,14 @@ class TestExtensions < MiniTest::Unit::TestCase
it 'allows delay of any ole class method' do it 'allows delay of any ole class method' do
SomeClass.delay.doit(Date.today) SomeClass.delay.doit(Date.today)
end end
module SomeModule
def self.doit(arg)
end
end
it 'allows delay of any module class method' do
SomeModule.delay.doit(Date.today)
end
end end
end end