method
bind_locals
v7.0.0 -
Show latest stable
-
0 notes -
Class: UnboundTemplate
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
bind_locals(locals)
public
Hide source
# File actionview/lib/action_view/unbound_template.rb, line 20 def bind_locals(locals) if template = @templates[locals] template else @write_lock.synchronize do normalized_locals = normalize_locals(locals) # We need ||=, both to dedup on the normalized locals and to check # while holding the lock. @templates[normalized_locals] ||= build_template(normalized_locals) # This may have already been assigned, but we've already de-dup'd so # reassignment is fine. @templates[locals.dup] = @templates[normalized_locals] end end end