Class: EacCli::Speaker::RequestFromList

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_cli/speaker/request_from_list.rb

Instance Method Summary collapse

Instance Method Details

#resultString

Returns:

  • (String)


15
16
17
18
19
20
21
# File 'lib/eac_cli/speaker/request_from_list.rb', line 15

def result
  loop do
    return list.build_value(input) if list.valid_value?(input)

    speaker.warn "Invalid input: \"#{input}\" (Valid: #{list.valid_labels.join(', ')})"
  end
end