Sha256: a60fc9053bf3f4f78bbc26a9bd108f6dfc2bb1920f3c7170b0b661623568feeb

Contents?: true

Size: 357 Bytes

Versions: 5

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

require "pastel"
require_relative "../lib/tty-spinner"

pastel = Pastel.new

format = "[#{pastel.yellow(":spinner")}] " + pastel.yellow("Task name")
spinner = TTY::Spinner.new(format, success_mark: pastel.green("+"), hide_cursor: true)
10.times do
  spinner.spin
  sleep(0.1)
end
spinner.success(pastel.green("(successful)"))

Version data entries

5 entries across 5 versions & 1 rubygems

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