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
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_anywhere(name, prefix, partial = false, details = {}, key = nil, locals = []) ⇒ Object
-
#find_all_with_query(query) ⇒ Object
:nodoc:.
-
#initialize ⇒ Resolver
constructor
A new instance of Resolver.
Constructor Details
Instance Method Details
#clear_cache ⇒ Object
140 141 142 |
# File 'lib/action_view/template/resolver.rb', line 140 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.
145 146 147 148 149 |
# File 'lib/action_view/template/resolver.rb', line 145 def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = []) cached(key, [name, prefix, partial], details, locals) do find_templates(name, prefix, partial, details) end end |
#find_all_anywhere(name, prefix, partial = false, details = {}, key = nil, locals = []) ⇒ Object
151 152 153 154 155 |
# File 'lib/action_view/template/resolver.rb', line 151 def find_all_anywhere(name, prefix, partial = false, details = {}, key = nil, locals = []) cached(key, [name, prefix, partial], details, locals) do find_templates(name, prefix, partial, details, true) end end |
#find_all_with_query(query) ⇒ Object
:nodoc:
157 158 159 |
# File 'lib/action_view/template/resolver.rb', line 157 def find_all_with_query(query) # :nodoc: @cache.cache_query(query) { find_template_paths(File.join(@path, query)) } end |