Module: Rushmate::UserInput

Defined in:
lib/rushmate/user_input.rb

Overview

The Rushmate::UserInput class is a convenience class it provides higher level apis to methods defined in TextMate::UI

Class Method Summary collapse

Class Method Details

.quick_menu_from_array(strings) ⇒ Object

quick_menu_from_array takes an array of strings and presents them as menu options similar to the context menu

Return type is the string the user selected

This method blocks until the user chooses an option, if the user presses esc the command is terminated without notifing the command script



14
15
16
# File 'lib/rushmate/user_input.rb', line 14

def quick_menu_from_array(strings)
  strings[TextMate::UI.menu(strings)]
end