Geminstaller C0 Coverage Information - RCov

lib/geminstaller/output_proxy.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/geminstaller/output_proxy.rb 36 31
100.00%
100.00%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 module GemInstaller
2   class OutputProxy
3     attr_writer :options
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
8 
9     def sysout(out)
10       return if silent?
11       $stdout.print out
12     end
13 
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
22     
23     # TODO: should remove this, make callers explicitly choose.
24     def output(output)
25       if @default_stream == :stdout
26         sysout(output)
27       else
28         syserr(output)
29       end
30     end
31     
32     def silent?
33       @options && @options[:silent]
34     end
35   end
36 end

Generated on Mon May 10 23:40:28 -0700 2010 with rcov 0.9.8