Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::StreamUI.new
() -> ::Gem::StreamUI
new(in_stream, out_stream, err_stream = $stderr, usetty = true)
lib/rubygems/user_interaction.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/user_interaction.rb, line 193
def initialize(in_stream, out_stream, err_stream = $stderr, usetty = true)
@ins = in_stream
@outs = out_stream
@errs = err_stream
@usetty = usetty
end
Creates a new StreamUI wrapping in_stream for user input, out_stream for standard output, err_stream for error output. If usetty is true then special operations (like asking for passwords) will use the TTY commands to disable character echo.