Sha256: 79a085a1da3a553358eea7ef001f9e67a10294f4a482f314ea45c446f05c054b

Contents?: true

Size: 187 Bytes

Versions: 13

Compression:

Stored size: 187 Bytes

Contents

module SimpleDeploy
  class Backoff
    def self.exp_periods(num_periods = 3)
      (1..num_periods).each do |n|
        yield (1.0/2.0 * (2.0**n - 1.0)).ceil
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
simple_deploy-0.7.1 lib/simple_deploy/backoff.rb
simple_deploy-0.7.0 lib/simple_deploy/backoff.rb
simple_deploy-0.6.7 lib/simple_deploy/backoff.rb
simple_deploy-0.6.6 lib/simple_deploy/backoff.rb
simple_deploy-0.6.5 lib/simple_deploy/backoff.rb
simple_deploy-0.6.4 lib/simple_deploy/backoff.rb
simple_deploy-0.6.3 lib/simple_deploy/backoff.rb
simple_deploy-0.6.2 lib/simple_deploy/backoff.rb
simple_deploy-0.6.1 lib/simple_deploy/backoff.rb
simple_deploy-0.6.0 lib/simple_deploy/backoff.rb
simple_deploy-0.5.6 lib/simple_deploy/backoff.rb
simple_deploy-0.5.5 lib/simple_deploy/backoff.rb
simple_deploy-0.5.4 lib/simple_deploy/backoff.rb