Parent

GemInstaller::OutputProxy

Attributes

options[W]

Public Instance Methods

default_stream=(stream) click to toggle source
   # File lib/geminstaller/output_proxy.rb, line 4
4:     def default_stream=(stream)
5:       raise GemInstaller::GemInstallerError.new("Invalid default stream: #{stream}") unless stream == :stderr or stream == :stdout
6:       @default_stream = stream
7:     end
output(output) click to toggle source

TODO: should remove this, make callers explicitly choose.

    # File lib/geminstaller/output_proxy.rb, line 24
24:     def output(output)
25:       if @default_stream == :stdout
26:         sysout(output)
27:       else
28:         syserr(output)
29:       end
30:     end
silent?() click to toggle source
    # File lib/geminstaller/output_proxy.rb, line 32
32:     def silent?
33:       @options && @options[:silent]
34:     end
syserr(err) click to toggle source
    # File lib/geminstaller/output_proxy.rb, line 14
14:     def syserr(err)
15:       return if silent?
16:       if @options[:redirect_stderr_to_stdout]
17:         $stdout.print err
18:       else
19:         $stderr.print err
20:       end
21:     end
sysout(out) click to toggle source
    # File lib/geminstaller/output_proxy.rb, line 9
 9:     def sysout(out)
10:       return if silent?
11:       $stdout.print out
12:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.