Class: Gem::SilentUI
- Defined in:
- lib/rubygems/user_interaction.rb
Overview
SilentUI is a UI choice that is absolutely silent.
Instance Attribute Summary
Attributes inherited from StreamUI
Instance Method Summary collapse
- #download_reporter(*args) ⇒ Object
-
#initialize ⇒ SilentUI
constructor
A new instance of SilentUI.
- #progress_reporter(*args) ⇒ Object
Methods inherited from StreamUI
#alert, #alert_error, #alert_warning, #ask, #ask_for_password, #ask_for_password_on_unix, #ask_for_password_on_windows, #ask_yes_no, #choose_from_list, #debug, #say, #terminate_interaction, #tty?
Constructor Details
#initialize ⇒ SilentUI
Returns a new instance of SilentUI.
540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/rubygems/user_interaction.rb', line 540 def initialize reader, writer = nil, nil begin reader = File.open('/dev/null', 'r') writer = File.open('/dev/null', 'w') rescue Errno::ENOENT reader = File.open('nul', 'r') writer = File.open('nul', 'w') end super reader, writer, writer, false end |
Instance Method Details
#download_reporter(*args) ⇒ Object
554 555 556 |
# File 'lib/rubygems/user_interaction.rb', line 554 def download_reporter(*args) SilentDownloadReporter.new(@outs, *args) end |
#progress_reporter(*args) ⇒ Object
558 559 560 |
# File 'lib/rubygems/user_interaction.rb', line 558 def progress_reporter(*args) SilentProgressReporter.new(@outs, *args) end |