In Files

  • rubygems/user_interaction.rb

Parent

Class/Module Index [+]

Quicksearch

Gem::StreamUI::ThreadedDownloadReporter

A progress reporter that behaves nicely with threaded downloading.

Constants

MUTEX

Attributes

file_name[R]

The current file name being displayed

Public Class Methods

new(out_stream, *args) click to toggle source

Creates a new threaded download reporter that will display on out_stream. The other arguments are ignored.

 
               # File rubygems/user_interaction.rb, line 568
def initialize(out_stream, *args)
  @file_name = nil
  @out = out_stream
end
            

Public Instance Methods

done() click to toggle source

Indicates the download is complete.

 
               # File rubygems/user_interaction.rb, line 594
def done
  # Do nothing.
end
            
fetch(file_name, *args) click to toggle source

Tells the download reporter that the file_name is being fetched. The other arguments are ignored.

 
               # File rubygems/user_interaction.rb, line 577
def fetch(file_name, *args)
  if @file_name.nil?
    @file_name = file_name
    locked_puts "Fetching #{@file_name}"
  end
end
            
update(bytes) click to toggle source

Updates the threaded download reporter for the given number of bytes.

 
               # File rubygems/user_interaction.rb, line 587
def update(bytes)
  # Do nothing.
end