aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/inline_template.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/inline_template.rb')
-rw-r--r--actionpack/lib/action_view/inline_template.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/inline_template.rb b/actionpack/lib/action_view/inline_template.rb
new file mode 100644
index 0000000000..87c012d181
--- /dev/null
+++ b/actionpack/lib/action_view/inline_template.rb
@@ -0,0 +1,20 @@
+module ActionView #:nodoc:
+ class InlineTemplate < Template #:nodoc:
+
+ def initialize(view, source, locals = {}, type = nil)
+ @view = view
+ @finder = @view.finder
+
+ @source = source
+ @extension = type
+ @locals = locals || {}
+
+ @handler = self.class.handler_class_for_extension(@extension).new(@view)
+ end
+
+ def method_key
+ @source
+ end
+
+ end
+end