350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
# File 'lib/tk/timer.rb', line 350
def set_start_proc(sleep=nil, init_proc=nil, *init_args, &b)
sleep = @init_sleep unless sleep
if sleep != 'idle' && sleep != :idle && !sleep.kind_of?(Integer)
fail ArgumentError, "expect Integer or 'idle' for 1st argument"
end
@init_sleep = sleep
@init_proc = init_proc
@init_args = init_args
@init_proc = b if !@init_proc && b
@init_proc = proc{|*args| } if @init_sleep > 0 && !@init_proc
self
end
|