Sha256: 8b60ead811ad19e17829307bf782da7967934f9ac3cc387e6062ab2b4c7c844a
Contents?: true
Size: 430 Bytes
Versions: 1
Compression:
Stored size: 430 Bytes
Contents
module QueueToTheFuture class Job (instance_methods - %w[__send__ __id__ object_id inspect]).each { |meth| undef_method(meth) } def initialize(*args, &block) @args = args @block = block end def __execute__ @result = @block.call(*@args) end def method_missing(*args, &block) Thread.pass while !defined?(@result) @result.send(*args, &block) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
queue_to_the_future-0.1.0 | lib/queue_to_the_future/job.rb |