From c0110a9faa1fc414c960a1c639aa8b121d92ca82 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Tue, 22 Jan 2008 01:46:34 +0000 Subject: Refactor template compilation from AV::Base into the template handlers. Closes #10888 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/template_handler.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'actionpack/lib/action_view/template_handler.rb') diff --git a/actionpack/lib/action_view/template_handler.rb b/actionpack/lib/action_view/template_handler.rb index b2c6ff3e36..d4892eccd3 100644 --- a/actionpack/lib/action_view/template_handler.rb +++ b/actionpack/lib/action_view/template_handler.rb @@ -1,5 +1,17 @@ module ActionView class TemplateHandler + # Map method names to their compile time + cattr_accessor :compile_time + @@compile_time = {} + + # Map method names to the names passed in local assigns so far + cattr_accessor :template_args + @@template_args = {} + + # Count the number of inline templates + cattr_accessor :inline_template_count + @@inline_template_count = 0 + def self.line_offset 0 end @@ -29,5 +41,10 @@ module ActionView # Called by CacheHelper#cache def cache_fragment(block, name = {}, options = nil) end + + # This method reads a template file. + def read_template_file(template_path, extension) + File.read(template_path) + end end end -- cgit v1.2.3