Sha256: 9f62cb04a5c11d92be6a5444550a8d0f175af845ef2102a67a2c939cdbb2a172
Contents?: true
Size: 554 Bytes
Versions: 1
Compression:
Stored size: 554 Bytes
Contents
require 'polling/version' require 'polling/confirm' require 'polling/sleep' require 'polling/target' module Polling module_function def run(arr, debug=false) arr = Confirm::check_arr(arr) args = {:start => false, :debug => debug} Sleep::exec Target::interval(0,args) args[:start] = true loop do arr.each do |time| time = Confirm::check_value(time) time = 0 if args[:start] && time >= 60 Sleep::exec Target::interval(time,args) args[:start] = false yield end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
polling-0.0.7 | lib/polling.rb |