C0 code coverage information

Generated on Sun Oct 26 11:17:55 -0500 2008 with rcov 0.8.1.2


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.
Name Total lines Lines of code Total coverage Code coverage
lib/aquarium/utils/set_utils.rb 37 26
100.0% 
100.0% 
 1 require 'set'
 2 
 3 module Aquarium
 4   module Utils
 5     module SetUtils
 6 
 7       # Return a set containing the input item or list of items. If the input
 8       # is a set or an array, it is returned. In all cases, the constructed set is a
 9       # flattened version of the input and any nil elements are removed by #strip_set_nils.
10       # Note that this behavior effectively converts <tt>nil</tt> to <tt>[]</tt>.
11       def make_set *value_or_set_or_array
12         strip_set_nils(convert_to_set(*value_or_set_or_array))
13       end
14 
15       # Return a new set that is a copy of the input set with all nils removed.
16       def strip_set_nils set
17         SetUtils.strip_set_nils set
18       end
19   
20       # Return a new set that is a copy of the input set with all nils removed.
21       def self.strip_set_nils set
22         set.delete_if {|x| x.nil?}
23       end
24   
25       protected
26       def convert_to_set *value_or_set_or_array
27         if value_or_set_or_array.nil? or value_or_set_or_array.empty?
28           Set.new
29         elsif value_or_set_or_array[0].kind_of?(Set)
30           value_or_set_or_array[0]
31         else
32           Set.new value_or_set_or_array.flatten
33         end
34       end
35     end
36   end
37 end

Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.

Valid XHTML 1.0! Valid CSS!