Sha256: b6aaee705753f536f494c1c1767fd88d9fce7164748697e679b4bf0a59936e23

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

require 'cli_spinnable/version'
require 'cli_spinnable/cli_spinnable_error'
require 'cli_spinnable/line/colourable_string'
require 'cli_spinnable/line/sign'
require 'cli_spinnable/line'
require 'cli_spinnable/writer'

module CliSpinnable
  module Methods
    def with_spinner
      writer = Writer.new(STDOUT, Line.new)
      yield writer
      writer.finalize
      self
    rescue CliSpinnableError => e
      raise e
    rescue StandardError => e
      writer.failure
      writer.finalize
      raise e
    end
  end

  include Methods

  class << self
    include Methods
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cli_spinnable-0.2 lib/cli_spinnable.rb