Class: ActionView::UnboundTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/action_view/unbound_template.rb

Instance Method Summary collapse

Constructor Details

#initialize(source, identifer, handler, options) ⇒ UnboundTemplate

Returns a new instance of UnboundTemplate.



7
8
9
10
11
12
13
14
# File 'lib/action_view/unbound_template.rb', line 7

def initialize(source, identifer, handler, options)
  @source = source
  @identifer = identifer
  @handler = handler
  @options = options

  @templates = Concurrent::Map.new(initial_capacity: 2)
end

Instance Method Details

#bind_locals(locals) ⇒ Object



16
17
18
# File 'lib/action_view/unbound_template.rb', line 16

def bind_locals(locals)
  @templates[locals] ||= build_template(locals)
end