Geminstaller C0 Coverage Information - RCov

lib/geminstaller/output_listener.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/geminstaller/output_listener.rb 33 28
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 dir = File.dirname(__FILE__)
2 require File.expand_path("#{dir}/requires.rb")
3 
4 module GemInstaller
5   class OutputListener
6     attr_writer :output_filter
7     
8     def initialize
9       @messages = []
10       @output_filter = nil
11     end
12     
13     def notify(msg, stream = :stdout)
14       @messages.push(msg)
15       return unless @output_filter
16       if stream == :stdout or stream == :stderr
17         @output_filter.rubygems_output(stream, msg)
18       else
19         raise GemInstaller::GemInstallerError.new("Invalid stream specified: #{@stream}")
20       end
21     end
22     
23     def read
24       @messages.dup
25     end
26 
27     def read!
28       messages = @messages.dup
29       @messages.clear
30       messages
31     end
32   end
33 end

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