Module: Gopher::Redirect
- Defined in:
- lib/gopher/redirect.rb
Defined Under Namespace
Classes: RedirectHandler
Class Method Summary collapse
Class Method Details
.extended(application) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/gopher/redirect.rb', line 5 def self.extended(application) application.add_handler "URL:(.+)", RedirectHandler.new.with(application) application.class.dsl_accessor :redirect_template application.redirect_template File.join(File.dirname(__FILE__), 'redirect.erb') application.helpers do def url(text, url, *args) line 'h', text, "/URL:#{url}", *args end end end |