Sha256: 831800fa59eb417b1f3387101169cae2b5461b4d453e339787547734902ee803

Contents?: true

Size: 207 Bytes

Versions: 4

Compression:

Stored size: 207 Bytes

Contents

module Sym
  module Extensions
    module WithTimeout

      def with_timeout(timeout = 3)
        status = Timeout.timeout(timeout) {
          yield if block_given?
        }
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sym-3.0.2 lib/sym/extensions/with_timeout.rb
sym-3.0.1 lib/sym/extensions/with_timeout.rb
sym-3.0.0 lib/sym/extensions/with_timeout.rb
sym-2.10.0 lib/sym/extensions/with_timeout.rb