Class: ActionView::InlineTemplate

Inherits:
Template show all
Defined in:
lib/action_view/inline_template.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Template

#extension, #filename, #handler, #locals, #method, #path, #path_without_extension

Instance Method Summary collapse

Methods inherited from Template

#base_path_for_exception, #prepare!, #render, #render_template, #source

Constructor Details

#initialize(view, source, locals = {}, type = nil) ⇒ InlineTemplate

Returns a new instance of InlineTemplate.



4
5
6
7
8
9
10
11
12
13
# File 'lib/action_view/inline_template.rb', line 4

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

Instance Method Details

#method_keyObject



15
16
17
# File 'lib/action_view/inline_template.rb', line 15

def method_key
  @source
end