Class: Gem::SilentUI

Inherits:
StreamUI show all
Defined in:
lib/rubygems/user_interaction.rb

Overview

SilentUI is a UI choice that is absolutely silent.

Instance Attribute Summary

Attributes inherited from StreamUI

#errs, #ins, #outs

Instance Method Summary collapse

Methods inherited from StreamUI

#_gets_noecho, #alert, #alert_error, #alert_warning, #ask, #ask_for_password, #ask_yes_no, #backtrace, #choose_from_list, #debug, #say, #terminate_interaction, #tty?

Constructor Details

#initializeSilentUI

The SilentUI has no arguments as it does not use any stream.



678
679
680
681
682
683
684
685
# File 'lib/rubygems/user_interaction.rb', line 678

def initialize
  reader, writer = nil, nil

  reader = File.open(Gem::Util::NULL_DEVICE, 'r')
  writer = File.open(Gem::Util::NULL_DEVICE, 'w')

  super reader, writer, writer, false
end

Instance Method Details

#closeObject



687
688
689
690
691
# File 'lib/rubygems/user_interaction.rb', line 687

def close
  super
  @ins.close
  @outs.close
end

#download_reporter(*args) ⇒ Object

:nodoc:



693
694
695
# File 'lib/rubygems/user_interaction.rb', line 693

def download_reporter(*args) # :nodoc:
  SilentDownloadReporter.new(@outs, *args)
end

#progress_reporter(*args) ⇒ Object

:nodoc:



697
698
699
# File 'lib/rubygems/user_interaction.rb', line 697

def progress_reporter(*args) # :nodoc:
  SilentProgressReporter.new(@outs, *args)
end