Class: Uffizzi::UI::Prompt

Inherits:
Object
  • Object
show all
Defined in:
lib/uffizzi/promt.rb

Instance Method Summary collapse

Constructor Details

#initializePrompt

Returns a new instance of Prompt.



8
9
10
# File 'lib/uffizzi/promt.rb', line 8

def initialize
  @prompt = TTY::Prompt.new
end

Instance Method Details

#ask(message, **args) ⇒ Object



16
17
18
# File 'lib/uffizzi/promt.rb', line 16

def ask(message, **args)
  @prompt.ask(message, **args)
end

#select(question, choices) ⇒ Object



12
13
14
# File 'lib/uffizzi/promt.rb', line 12

def select(question, choices)
  @prompt.select(question, choices)
end

#yes?(message) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/uffizzi/promt.rb', line 20

def yes?(message)
  @prompt.yes?(message)
end