Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • rubygems/user_interaction.rb

Class/Module Index [+]

Quicksearch

Gem::UserInteraction

Make the default UI accessable 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

Public Instance Methods

alert click to toggle source
 
               # File rubygems/user_interaction.rb, line 90
  
            
alert_error click to toggle source
 
               # File rubygems/user_interaction.rb, line 93
  
            
alert_warning click to toggle source
 
               # File rubygems/user_interaction.rb, line 96
  
            
ask click to toggle source
 
               # File rubygems/user_interaction.rb, line 99
  
            
ask_yes_no click to toggle source
 
               # File rubygems/user_interaction.rb, line 102
  
            
choose_from_list click to toggle source
 
               # File rubygems/user_interaction.rb, line 105
  
            
say click to toggle source
 
               # File rubygems/user_interaction.rb, line 108
  
            
terminate_interaction click to toggle source
 
               # File rubygems/user_interaction.rb, line 111
  
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus