Sha256: 7877ac6fc841fcc327bfccaf9c63f4b04da84dc802c1ab743056c3836c052a1b
Contents?: true
Size: 315 Bytes
Versions: 7
Compression:
Stored size: 315 Bytes
Contents
# encoding: utf-8 class Promise module Progress def on_progress(&block) (@on_progress ||= []).tap do |callbacks| callbacks << block if block_given? end end def progress(status) if pending? on_progress.each { |block| block.call(status) } end end end end
Version data entries
7 entries across 7 versions & 1 rubygems