Updated README.rdoc again
[feedcatcher.git] / vendor / rails / actionpack / lib / action_view / template_handler.rb
1 # Legacy TemplateHandler stub
2 module ActionView
3 module TemplateHandlers #:nodoc:
4 module Compilable
5 def self.included(base)
6 base.extend(ClassMethods)
7 end
8
9 module ClassMethods
10 def call(template)
11 new.compile(template)
12 end
13 end
14
15 def compile(template)
16 raise "Need to implement #{self.class.name}#compile(template)"
17 end
18 end
19 end
20
21 class TemplateHandler
22 def self.call(template)
23 "#{name}.new(self).render(template, local_assigns)"
24 end
25
26 def initialize(view = nil)
27 @view = view
28 end
29
30 def render(template, local_assigns)
31 raise "Need to implement #{self.class.name}#render(template, local_assigns)"
32 end
33 end
34 end