Class: ActionView::Resolver
- Inherits:
-
Object
- Object
- ActionView::Resolver
- Defined in:
- lib/action_view/template/resolver.rb
Overview
Action View Resolver
Direct Known Subclasses
Defined Under Namespace
Classes: Cache, Path, PathParser
Instance Method Summary collapse
- #clear_cache ⇒ Object
-
#find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = []) ⇒ Object
Normalizes the arguments and passes it on to find_templates.
-
#find_all_with_query(query) ⇒ Object
:nodoc:.
-
#initialize ⇒ Resolver
constructor
A new instance of Resolver.
Constructor Details
Instance Method Details
#clear_cache ⇒ Object
146 147 148 |
# File 'lib/action_view/template/resolver.rb', line 146 def clear_cache @cache.clear end |
#find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = []) ⇒ Object
Normalizes the arguments and passes it on to find_templates.
151 152 153 154 155 156 157 |
# File 'lib/action_view/template/resolver.rb', line 151 def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = []) locals = locals.map(&:to_s).sort!.freeze cached(key, [name, prefix, partial], details, locals) do _find_all(name, prefix, partial, details, key, locals) end end |
#find_all_with_query(query) ⇒ Object
:nodoc:
159 160 161 |
# File 'lib/action_view/template/resolver.rb', line 159 def find_all_with_query(query) # :nodoc: @cache.cache_query(query) { find_template_paths(File.join(@path, query)) } end |