Sha256: fdab0c651a2a550861f9055dc72419251c51edb15e023e92a8361f1c8ca6e15f

Contents?: true

Size: 352 Bytes

Versions: 5

Compression:

Stored size: 352 Bytes

Contents

# frozen_string_literal: true

require_relative "../lib/tty-spinner"

spinner = TTY::Spinner.new("[:spinner] :title")
spinner.update(title: "Task name")

spinner.auto_spin

sleep(2)

spinner.update(title: "Paused task name")
spinner.pause(mark: "?")

sleep(2)

spinner.resume
spinner.update(title: "Task name")

sleep(2)

spinner.stop("done...")

puts

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
planter-cli-3.0.7 lib/tty-spinner/examples/pause.rb
planter-cli-3.0.5 lib/tty-spinner/examples/pause.rb
planter-cli-3.0.4 lib/tty-spinner/examples/pause.rb
planter-cli-3.0.3 lib/tty-spinner/examples/pause.rb
planter-cli-3.0.2 lib/tty-spinner/examples/pause.rb