lib/cli/mastermind/user_interface.rb
# Waits for a block to execute while displaying a spinner.
#
# @param title [String] the title to display
#
# @yieldparam spinner [CLI::UI::Spinner]
Waits for a block to execute while displaying a spinner.
Waits for a block to execute while displaying a spinner .
def await(title)
      @results[title] = nil
      add(title) do |spinner|
        catch(:success) do
          msg = catch(:fail) do
            @results[title] = yield spinner
            throw :success
          end
          puts msg
          CLI::UI::Spinner::TASK_FAILED
        end
      end
    end
def await ( title ) @results [ title ] = nil add ( title ) do | spinner | catch ( :success ) do msg = catch ( :fail ) do @results [ title ] = yield spinner throw :success end puts msg CLI :: UI :: Spinner :: TASK_FAILED end end end
Waits for a block to execute while displaying a spinner.
Waits for a block to execute while displaying a spinner .
title
the title to display
the title to display
<not_specific>
None