Sha256: 3ad1b2ed5898c06172c06eb977ab7512f238301dba1ed20301f08d4721414c13

Contents?: true

Size: 336 Bytes

Versions: 4

Compression:

Stored size: 336 Bytes

Contents

module Greenjaguar
  module Strategies
    class FixedIntervalStrategy < WaitStrategy
      def initialize(*args)
        super
        @time_to_wait = args[0]
      end

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

      def wait
        sleep @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/fixed_interval_strategy.rb
greenjaguar-0.0.5 lib/greenjaguar/strategies/fixed_interval_strategy.rb
greenjaguar-0.0.4 lib/greenjaguar/strategies/fixed_interval_strategy.rb
greenjaguar-0.0.3 lib/greenjaguar/strategies/fixed_interval_strategy.rb