C0 code coverage information
Generated on Sat Feb 02 17:44:26 +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 # Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
2 # All files in this distribution are subject to the terms of the Ruby license.
3
4 require 'ramaze/trinity'
5
6 module Ramaze
7
8 # A module used by the Templates and the Controllers
9 # it provides both Ramaze::Trinity (request/response/session)
10 # and also a helper method, look below for more information about it
11
12 module Helper
13 include Trinity
14
15 private
16
17 # This loads the helper-files from /ramaze/helper/helpername.rb and
18 # includes it into Ramaze::Template (or wherever it is called)
19 #
20 # Usage:
21 # helper :redirect, :link
22
23 def helper *syms
24 syms.each do |sym|
25 mod_name = sym.to_s.camel_case + 'Helper'
26 begin
27 include ::Ramaze.const_get(mod_name)
28 extend ::Ramaze.const_get(mod_name)
29 rescue NameError
30 files = Dir["{helper,#{BASEDIR/:ramaze/:helper}}/#{sym}.{so,bundle,rb}"]
31 raise LoadError, "#{mod_name} not found" unless files.any?
32 require(files.first) ? retry : raise
33 end
34 end
35 end
36 end
37 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.