Sha256: 90e8c0ef4f90fd60e153fa1e75fef128b2e071c73663884fac2ea244ebf360e2

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'cli_spinnable'

module Cli
  extend CliSpinnable
end

# Don't print multiline strings inside `with_spinner` block.

# Good:
Cli.with_spinner do |cli|
  cli.print 'Downloading something'
  sleep 1
  cli.tick
end

print "Multiline\nstring"

# Bad:
Cli.with_spinner do |cli|
  cli.print 'Downloading something'
  sleep 1
  cli.tick
  print "Multiline\nstring"
end
s
# Bad:

Cli.with_spinner do |cli|
  cli.print 'Downloading something'
  sleep 1
  cli.tick
  cli.print "Multiline\nstring"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cli_spinnable-0.2 examples/example4.rb