Module | Gem::UserInteraction |
In: |
lib/rubygems/user_interaction.rb
|
Make the default UI accessible without the "ui." prefix. Classes including this module may use the interaction methods on the default UI directly. Classes may also reference the ui and ui= methods.
Example:
class X include Gem::UserInteraction def get_answer n = ask("What is the meaning of life?") end end
# File lib/rubygems/user_interaction.rb, line 91 91: def alert_error(*args) 92: ui.alert_error(*args) 93: end
# File lib/rubygems/user_interaction.rb, line 95 95: def alert_warning(*args) 96: ui.alert_warning(*args) 97: end
# File lib/rubygems/user_interaction.rb, line 103 103: def ask_for_password(*args) 104: ui.ask_for_password(*args) 105: end
# File lib/rubygems/user_interaction.rb, line 107 107: def ask_yes_no(*args) 108: ui.ask_yes_no(*args) 109: end
# File lib/rubygems/user_interaction.rb, line 111 111: def choose_from_list(*args) 112: ui.choose_from_list(*args) 113: end