Module: Ramaze::Helper::Methods
- Included in:
- Amrita2::Template, Ezamar::Element, Controller, Template::Markaby, Template::Template, Tenjin::Context
- Defined in:
- lib/ramaze/helper.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#helper(*syms) ⇒ Object
This loads the helper-files from /ramaze/helper/helpername.rb and includes it into Ramaze::Template (or wherever it is called).
Class Method Details
Instance Method Details
#helper(*syms) ⇒ Object
This loads the helper-files from /ramaze/helper/helpername.rb and includes it into Ramaze::Template (or wherever it is called)
Usage:
helper :redirect, :link
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ramaze/helper.rb', line 38 def helper(*syms) syms.each do |sym| name = sym.to_s if mod = find_helper(name) use_helper(mod) else if require_helper(name) redo else raise LoadError, "#{name} not found" end end end end |