Class Index [+]

Quicksearch

Gem::DefaultUserInteraction

Module that defines the default UserInteraction. Any class including this module will have access to the ui method that returns the default UI.

Public Class Methods

ui() click to toggle source

Return the default UI.

    # File lib/rubygems/user_interaction.rb, line 22
22:   def self.ui
23:     @ui ||= Gem::ConsoleUI.new
24:   end
ui=(new_ui) click to toggle source

Set the default UI. If the default UI is never explicitly set, a simple console based UserInteraction will be used automatically.

    # File lib/rubygems/user_interaction.rb, line 30
30:   def self.ui=(new_ui)
31:     @ui = new_ui
32:   end
use_ui(new_ui) click to toggle source

Use new_ui for the duration of block.

    # File lib/rubygems/user_interaction.rb, line 37
37:   def self.use_ui(new_ui)
38:     old_ui = @ui
39:     @ui = new_ui
40:     yield
41:   ensure
42:     @ui = old_ui
43:   end

Public Instance Methods

ui() click to toggle source

See DefaultUserInteraction::ui

    # File lib/rubygems/user_interaction.rb, line 48
48:   def ui
49:     Gem::DefaultUserInteraction.ui
50:   end
ui=(new_ui) click to toggle source

See DefaultUserInteraction::ui=

    # File lib/rubygems/user_interaction.rb, line 55
55:   def ui=(new_ui)
56:     Gem::DefaultUserInteraction.ui = new_ui
57:   end
use_ui(new_ui, &block) click to toggle source

See DefaultUserInteraction::use_ui

    # File lib/rubygems/user_interaction.rb, line 62
62:   def use_ui(new_ui, &block)
63:     Gem::DefaultUserInteraction.use_ui(new_ui, &block)
64:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.