Module: UserInput

Defined in:
lib/userinput.rb,
lib/userinput/prompt.rb,
lib/userinput/boolean.rb

Overview

User input library

Defined Under Namespace

Classes: Boolean, Prompt

Constant Summary collapse

VALIDATIONS =

Hash of validation strategies

{
  Proc => :call,
  Regexp => :match,
  Enumerable => :include?
}.freeze
MESSAGE_TEMPLATE =
'%{message}%{separator} %{default}'.freeze

Class Method Summary collapse

Class Method Details

.new(*args, &block) ⇒ Object

Insert a helper .new() method for creating a new Prompt object


15
16
17
# File 'lib/userinput.rb', line 15

def new(*args, &block)
  self::Prompt.new(*args, &block)
end