Method: HighLine::Menu#choices
- Defined in:
- lib/highline/menu.rb
#choices(*names, &action) ⇒ void
This method returns an undefined value.
A shortcut for multiple calls to the sister method #choice. Be warned: An action set here will apply to all provided names. This is considered to be a feature, so you can easily hand-off interface processing to a different chunk of code. choice has more options available to you, like longer text or help (and of course, individual actions)
237 238 239 |
# File 'lib/highline/menu.rb', line 237 def choices(*names, &action) names.each { |n| choice(n, &action) } end |