Method: Clin::Shell#select

Defined in:
lib/clin/shell.rb

#select(statement, choices, default: nil) ⇒ Object

Ask a question with a list of possible answer. Answer can either be selected using their name or their index e.g. Select answer:

  1. Choice A

  2. Choice B

  3. Choice C



73
74
75
# File 'lib/clin/shell.rb', line 73

def select(statement, choices, default: nil)
  Clin::ShellInteraction::Select.new(self).run(statement, choices, default: default)
end