C0 code coverage information

Generated on Sat May 27 21:23:39 CEST 2006 with rcov 0.5.0


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/html_engine.rb 29 23
72.4% 
69.6% 
 1 class HtmlEngine
 2   
 3   def self.transform(txt, text_filter, restrictions = [])
This method was called by:

      2   app/models/comment.rb:29 in 'transform_body'
      2   app/models/article.rb:94 in 'transform_body'
      2   app/models/article.rb:93 in 'transform_body'
      1   app/models/theme.rb:17 in 'description'

 4     return "" if txt.blank?
 5     return txt if text_filter.blank?
 6 
 7     text_filter.split.each do |filter|
 8       case filter
 9       when "markdown": 
10         txt = BlueCloth.new(txt, restrictions).to_html
11       when "textile": 
12         txt = self.encode_html(txt) if restrictions.include?(:filter_html)
13         txt = RedCloth.new(txt, restrictions).to_html(:textile)
14       when "smartypants":
15         txt = RubyPants.new(txt).to_html
16       end
17     end
18 
19     return txt
20   end
21 
22   # Taken from BlueCloth since RedCloth's filter_html is broken
23   def self.encode_html( str )
24     str.gsub!( "<", "&lt;" )
25     str.gsub!( ">", "&gt;" )
26     str
27 	end 
28 
29 end

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

Valid XHTML 1.0! Valid CSS!