C0 code coverage information
Generated on Sun Jun 11 23:15:16 CEST 2006 with rcov 0.6.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.
1 class HtmlEngine
Calls
1 Class#inherited at vendor/rails/activesupport/lib/active_support/class_inheritable_attributes.rb:108
2
3 def self.transform(txt, text_filter, restrictions = [])
Called by
2 app/models/article.rb:94 in 'Article#transform_body'
2 app/models/article.rb:93 in 'Article#transform_body'
2 app/models/comment.rb:29 in 'Comment#transform_body'
1 app/models/theme.rb:17 in 'Theme#description'
4 return "" if txt.blank?
Calls
7 String#blank? at vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:29
5 return txt if text_filter.blank?
Calls
5 String#blank? at vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:29
6
7 text_filter.split.each do |filter|
8 case filter
9 when "markdown":
10 txt = BlueCloth.new(txt, restrictions).to_html
Calls
1 BlueCloth#to_html at vendor/bluecloth/lib/bluecloth.rb:163
1 BlueCloth#initialize at vendor/bluecloth/lib/bluecloth.rb:126
11 when "textile":
12 txt = self.encode_html(txt) if restrictions.include?(:filter_html)
Calls
2 #<Class:HtmlEngine>#encode_html at lib/html_engine.rb:23
13 txt = RedCloth.new(txt, restrictions).to_html(:textile)
Calls
2 RedCloth#to_html at vendor/redcloth/lib/redcloth.rb:254
2 RedCloth#initialize at vendor/redcloth/lib/redcloth.rb:242
14 when "smartypants":
15 txt = RubyPants.new(txt).to_html
Calls
1 RubyPants#to_html at vendor/rubypants/rubypants.rb:213
1 RubyPants#initialize at vendor/rubypants/rubypants.rb:207
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 )
Called by
2 lib/html_engine.rb:12 in '#<Class:HtmlEngine>#transform'
24 str.gsub!( "<", "<" )
25 str.gsub!( ">", ">" )
26 str
27 end
28
29 end
Generated using the rcov code coverage analysis tool for Ruby version 0.6.0.