Method: TkTimer#at_end

Defined in:
lib/tk/timer.rb

#at_end(*arg, &b) ⇒ Object



486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/tk/timer.rb', line 486

def at_end(*arg, &b)
  if arg.empty?
    if b
      @at_end_proc = b
    else
      # no proc
      return @at_end_proc
    end
  else
    fail ArgumentError, "wrong number of arguments" if arg.length != 1 || b
    @at_end_proc = arg[0]
  end
  self
end