C0 code coverage information
Generated on Sun Jun 11 23:15:14 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 PageCache < ActiveRecord::Base
Calls
1 #<Class:ActiveRecord::Base>#inherited at vendor/rails/activerecord/lib/active_record/base.rb:246
2
3 cattr_accessor :public_path
Calls
1 Class#cattr_accessor at vendor/rails/activesupport/lib/active_support/class_attribute_accessors.rb:53
4 @@public_path = RAILS_ROOT + "/public"
5
6 def self.sweep(pattern)
7 destroy_all("name like '#{pattern}'")
8 end
9
10 def self.sweep_all
11 destroy_all
12 end
13
14 private
15
16 after_destroy :expire_cache
Calls
1 #<Class:ActiveRecord::Base>#after_destroy at (eval):1
17
18 def expire_cache
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
19 # It'd be better to call expire_page here, except it's a
20 # controller method and we can't get to it.
21 path = PageCache.public_path + "/#{self.name}"
22
23 logger.info "Sweeping #{self.name}"
24 delete_file(path)
25 end
26
27 def delete_file(path)
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
28 File.delete(path) if File.file?(path)
29 end
30 end
Generated using the rcov code coverage analysis tool for Ruby version 0.6.0.