C0 code coverage information

Generated on Sat Feb 02 17:44:23 +0100 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
examples/templates/template_amrita2.rb 77 61
62.3% 
52.5% 
 1 require 'rubygems'
 2 require 'ramaze'
 3 
 4 # TODO:
 5 #   - implement the amrita2 example, man, this engine is awkward :P
 6 
 7 class MainController < Ramaze::Controller
 8   template_root __DIR__/:template
 9   engine :Amrita2
10 
11   def index
12     %{ #{A 'Home', :href => :/} | #{A(:internal)} | #{A(:external)} }
13   end
14 
15   def internal(*args)
16     @data = binding
17     @place = :internal
18     <<__AMRITA2__
19 <html>
20   <head>
21     <title>Template::Amrita2 external</title>
22   </head>
23   <body>
24   <h1 am:src="title" />
25     <%= link_home %>
26     <p>
27       Here you can pass some stuff if you like, parameters are just passed like this:<br />
28       <%= link_one %><br />
29       <%= link_two %><br />
30       <%= link_three %>
31     </p>
32     <<div<
33       <<:args<
34         <span><%= $_ %></span>
35     <%= inspect_parameters %>
36   </body>
37 </html>
38 __AMRITA2__
39   end
40 
41   def external(*args)
42     @data = binding
43     @place = :external
44   end
45 
46   private
47 
48   def title
49     "The #{@place} Template for Amrita2"
50   end
51 
52   def link_home
53     A('Home', :href => '/')
54   end
55 
56   def link_one
57     A("/#{@place}/one", :href => Rs(@place, :one))
58   end
59 
60   def link_two
61     A("/#{@place}/one/two/three", :href => Rs(@place, :one, :two, :three))
62   end
63 
64   def link_three
65     A("/#{@place}?foo=bar", :href => Rs(@place, :one, :foo => :bar))
66   end
67 
68   def inspect_parameters
69     request.params.inspect
70   end
71 
72   def args
73     @params.map{|arg| "<span>#{arg}</span>"}.join(' ')
74   end
75 end
76 
77 Ramaze.start

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

Valid XHTML 1.0! Valid CSS!