Module: Orion6Rep::ClassMethods

Defined in:
lib/orion6_rep.rb

Instance Method Summary collapse

Instance Method Details

#detect_repsObject



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/orion6_rep.rb', line 45

def detect_reps
  command = Orion6Rep::DetectReps.new
  command.execute
  runtime = Time.now
  previous_response = nil
  response = {}
  while runtime + 5 > Time.now do
    response = command.pool
    sleep(0.2) if previous_response == response
    previous_response = response
  end
  return response
end