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.86 lib/doing/prompt/prompt.rb
doing-2.1.85 lib/doing/prompt/prompt.rb
doing-2.1.84 lib/doing/prompt/prompt.rb
doing-2.1.83 lib/doing/prompt/prompt.rb
doing-2.1.82 lib/doing/prompt/prompt.rb
doing-2.1.81 lib/doing/prompt/prompt.rb
doing-2.1.80 lib/doing/prompt/prompt.rb
doing-2.1.79 lib/doing/prompt/prompt.rb
doing-2.1.78 lib/doing/prompt/prompt.rb
doing-2.1.77 lib/doing/prompt/prompt.rb
doing-2.1.76 lib/doing/prompt/prompt.rb
doing-2.1.75 lib/doing/prompt/prompt.rb
doing-2.1.74 lib/doing/prompt/prompt.rb
doing-2.1.73 lib/doing/prompt/prompt.rb
doing-2.1.72 lib/doing/prompt/prompt.rb
doing-2.1.69 lib/doing/prompt/prompt.rb
doing-2.1.68 lib/doing/prompt/prompt.rb
doing-2.1.66 lib/doing/prompt/prompt.rb
doing-2.1.65 lib/doing/prompt/prompt.rb
doing-2.1.64 lib/doing/prompt/prompt.rb