diff options
-rw-r--r-- | lib/rubygems/user_interaction.rb | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -172,6 +172,7 @@ end # Gem::StreamUI implements a simple stream based user interface. class Gem::StreamUI extend Gem::Deprecate ## @@ -386,6 +387,7 @@ class Gem::StreamUI # An absolutely silent progress reporter. class SilentProgressReporter ## # The count of items is never updated for the silent progress reporter. @@ -410,12 +412,14 @@ class Gem::StreamUI def done end end ## # A basic dotted progress reporter. class SimpleProgressReporter include Gem::DefaultUserInteraction ## @@ -453,12 +457,14 @@ class Gem::StreamUI def done @out.puts "\n#{@terminal_message}" end end ## # A progress reporter that prints out messages about the current progress. class VerboseProgressReporter include Gem::DefaultUserInteraction ## @@ -495,6 +501,7 @@ class Gem::StreamUI def done @out.puts @terminal_message end end ## @@ -512,6 +519,7 @@ class Gem::StreamUI # An absolutely silent download reporter. class SilentDownloadReporter ## # The silent download reporter ignores all arguments @@ -537,12 +545,14 @@ class Gem::StreamUI def done end end ## # A progress reporter that behaves nicely with threaded downloading. class ThreadedDownloadReporter MUTEX = Mutex.new ## @@ -591,7 +601,9 @@ class Gem::StreamUI @out.puts message end end end end ## @@ -599,6 +611,7 @@ end # STDOUT, and STDERR. class Gem::ConsoleUI < Gem::StreamUI ## # The Console UI has no arguments as it defaults to reading input from # stdin, output to stdout and warnings or errors to stderr. @@ -606,12 +619,14 @@ class Gem::ConsoleUI < Gem::StreamUI def initialize super STDIN, STDOUT, STDERR, true end end ## # SilentUI is a UI choice that is absolutely silent. class Gem::SilentUI < Gem::StreamUI ## # The SilentUI has no arguments as it does not use any stream. @@ -637,4 +652,5 @@ class Gem::SilentUI < Gem::StreamUI def progress_reporter(*args) # :nodoc: SilentProgressReporter.new(@outs, *args) end end |