class Greenjaguar::Strategies::FibonacciStrategy

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/greenjaguar/strategies/fibonacci_strategy.rb, line 4
def initialize
  super
  @prev_time_to_wait = 1
  @time_to_wait = @prev_time_to_wait
end

Public Instance Methods

reset_vars() click to toggle source
# File lib/greenjaguar/strategies/fibonacci_strategy.rb, line 10
def reset_vars
  @prev_time_to_wait = 1 * convert_to(time_unit)
  @time_to_wait = @prev_time_to_wait
end
wait() click to toggle source
# File lib/greenjaguar/strategies/fibonacci_strategy.rb, line 15
def wait
  sleep @time_to_wait
  new_time = @prev_time_to_wait + @time_to_wait
  @prev_time_to_wait = @time_to_wait
  @time_to_wait = new_time
end