Geminstaller C0 Coverage Information - RCov

lib/geminstaller/output_observer.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/geminstaller/output_observer.rb 36 29
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 OutputObserver
3     attr_writer :stream
4     # TODO: GemRunnerProxy should raise exception if listener still has any leftover output when run is invoked. 
5     def initialize
6       @stream = :stdout
7       @listeners = []
8     end
9 
10     def register(listener)
11       listener = [listener] unless listener.is_a?(Array)
12       @listeners += listener
13     end
14     
15     def unregister(listener)
16       @listeners.delete(listener)
17     end
18     
19     def print(output)
20       @listeners.each do |listener|
21         listener.notify(output, @stream)
22       end
23     end
24     
25     def puts(output)
26       print("#{output}\n")
27     end
28 
29     def tty?
30       false
31     end
32     
33     def flush
34     end
35   end
36 end

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