C0 code coverage information
Generated on Sat Feb 02 17:44:22 +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.
1 require 'rubygems'
2 require 'ramaze'
3
4 class MainController < Ramaze::Controller
5 map :/
6
7 helper :cache
8 cache :index
9
10 def index
11 %[
12 <html>
13 <head><title>examples/caching</title></head>
14 <body>
15 <p>
16 This action just shows you a random number: #{rand * 100}.<br />
17 If you <a href="/">refresh</a> the page it won't change since you see a cached version.<br />
18 But if you <a href="/invalidate">invalidate</a> it, the page will be regenerated.
19 </p>
20 </body>
21 </html>
22 ]
23 end
24
25 def invalidate
26 action_cache.delete '/index'
27 redirect :/
28 end
29 end
30
31 Ramaze.start
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.