Sha256: 02ab6460e2ea9ab3dbecec590770a5ec65f71fdf7b5317a3323a023cd725f48c

Contents?: true

Size: 304 Bytes

Versions: 4

Compression:

Stored size: 304 Bytes

Contents

module Greenjaguar
  module Strategies
    class RandomStrategy < WaitStrategy
      def initialize
        super
        @time_to_wait = 5
      end

      def reset_vars
        @time_to_wait = 5 * convert_to(time_unit)
      end

      def wait
        rand(@time_to_wait)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
greenjaguar-0.0.6 lib/greenjaguar/strategies/random_strategy.rb
greenjaguar-0.0.5 lib/greenjaguar/strategies/random_strategy.rb
greenjaguar-0.0.4 lib/greenjaguar/strategies/random_strategy.rb
greenjaguar-0.0.3 lib/greenjaguar/strategies/random_strategy.rb