Sha256: e3979584a73fa0ed45ededc47b90bebb7c857350d27a7a6b397952ef8c34f58e

Contents?: true

Size: 426 Bytes

Versions: 35

Compression:

Stored size: 426 Bytes

Contents

module Calabash
  module Android
    module Retry
      def self.retry(opts, &blk)
        tries = opts[:tries]
        interval = opts[:interval]

        tries.times do |try|
          begin
            blk.call
            return

          rescue => e
            if (try + 1) >= tries
              raise
            else
              sleep interval
            end
          end
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
calabash-android-0.9.30 lib/calabash-android/retry.rb
calabash-android-0.9.29 lib/calabash-android/retry.rb
calabash-android-0.9.28 lib/calabash-android/retry.rb
calabash-android-0.9.25 lib/calabash-android/retry.rb
calabash-android-0.9.24 lib/calabash-android/retry.rb
calabash-android-0.9.22 lib/calabash-android/retry.rb
calabash-android-0.9.21 lib/calabash-android/retry.rb
calabash-android-0.9.20 lib/calabash-android/retry.rb
calabash-android-0.9.19 lib/calabash-android/retry.rb
calabash-android-0.9.18 lib/calabash-android/retry.rb
calabash-android-0.9.17 lib/calabash-android/retry.rb
calabash-android-0.9.16 lib/calabash-android/retry.rb
calabash-android-0.9.14 lib/calabash-android/retry.rb
calabash-android-0.9.12 lib/calabash-android/retry.rb
calabash-android-0.9.11 lib/calabash-android/retry.rb
calabash-android-0.9.10 lib/calabash-android/retry.rb
calabash-android-0.9.9 lib/calabash-android/retry.rb
calabash-android-0.9.8 lib/calabash-android/retry.rb
calabash-android-0.9.7 lib/calabash-android/retry.rb
calabash-android-0.9.6 lib/calabash-android/retry.rb