Sha256: 0e3f8f213a498929cddd9977b3c13d0c6815b716469c8dfa6427fddbd5af778d

Contents?: true

Size: 332 Bytes

Versions: 4

Compression:

Stored size: 332 Bytes

Contents

# frozen_string_literal: true
class Shoes
  module Swt
    class Timer
      def initialize(dsl, app, blk)
        @blk = blk
        task = proc do
          eval_block unless app.real.disposed?
        end
        ::Swt.display.timer_exec(dsl.n, task)
      end

      def eval_block
        @blk.call
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre12 lib/shoes/swt/timer.rb
shoes-swt-4.0.0.pre11 lib/shoes/swt/timer.rb
shoes-swt-4.0.0.pre10 lib/shoes/swt/timer.rb
shoes-swt-4.0.0.pre9 lib/shoes/swt/timer.rb