Sha256: c6ebfa0dcdff06b0b8ddca7d0b7781dfe2f2debf344f9096703982736daa72e5

Contents?: true

Size: 827 Bytes

Versions: 39

Compression:

Stored size: 827 Bytes

Contents

# frozen_string_literal: true

require_relative 'choose'
require_relative 'fzf'
require_relative 'input'
require_relative 'std'
require_relative 'yn'

module Doing
  # Terminal Prompt methods
  module Prompt
    class << self
      attr_writer :force_answer, :default_answer

      include Color
      include PromptSTD
      include PromptInput
      include PromptYN
      include PromptFZF
      include PromptChoose

      ##
      ## Value to return if prompt is skipped
      ##
      ## @return     Force answer value
      ##
      def force_answer
        @force_answer ||= nil
      end

      ##
      ## If true, always return the default answer without prompting
      ##
      ## @return     [Boolean] default answer
      ##
      def default_answer
        @default_answer ||= false
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
doing-2.1.63 lib/doing/prompt/prompt.rb
doing-2.1.62 lib/doing/prompt/prompt.rb
doing-2.1.61 lib/doing/prompt/prompt.rb
doing-2.1.60 lib/doing/prompt/prompt.rb
doing-2.1.58 lib/doing/prompt/prompt.rb
doing-2.1.57 lib/doing/prompt/prompt.rb
doing-2.1.56 lib/doing/prompt/prompt.rb
doing-2.1.55 lib/doing/prompt/prompt.rb
doing-2.1.54 lib/doing/prompt/prompt.rb
doing-2.1.52 lib/doing/prompt/prompt.rb
doing-2.1.49 lib/doing/prompt/prompt.rb
doing-2.1.48 lib/doing/prompt/prompt.rb
doing-2.1.47 lib/doing/prompt/prompt.rb
doing-2.1.46 lib/doing/prompt/prompt.rb
doing-2.1.45 lib/doing/prompt/prompt.rb
doing-2.1.44 lib/doing/prompt/prompt.rb
doing-2.1.43 lib/doing/prompt/prompt.rb
doing-2.1.42 lib/doing/prompt/prompt.rb
doing-2.1.41 lib/doing/prompt/prompt.rb