lib/tty/progressbar/multi.rb
# Observe a bar for emitted events
#
# @param [TTY::ProgressBar] bar
#   the bar to observe for events
#
# @api private
Observe a bar for emitted events
Observe a bar for emitted events
def observe(bar)
        bar.on(:progress, &progress_handler)
           .on(:done) { emit(:done) if complete? }
           .on(:stopped) { emit(:stopped) if stopped? }
           .on(:paused) { emit(:paused) if paused? }
      end
def observe ( bar ) bar . on ( :progress , & progress_handler ) . on ( :done ) { emit ( :done ) if complete? } . on ( :stopped ) { emit ( :stopped ) if stopped? } . on ( :paused ) { emit ( :paused ) if paused? } end
Observe a bar for emitted events
Observe a bar for emitted events
bar
<not_specific>
<not_specific>
bar the bar to observe for events
bar the bar to observe for events
api
None