Sha256: 239dd1bde935148fb1d693ffc131c20bfd7c322b0abb1d6e61adb85d7a567f33
Contents?: true
Size: 507 Bytes
Versions: 1
Compression:
Stored size: 507 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) 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.5 | lib/polling.rb |