Class: ActionView::PathResolver
- Defined in:
- lib/action_view/template/resolver.rb
Overview
An abstract class that implements a Resolver with path semantics.
Direct Known Subclasses
Constant Summary collapse
- EXTENSIONS =
:nodoc:
{ locale: ".", formats: ".", variants: "+", handlers: "." }
- DEFAULT_PATTERN =
":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:handlers,}"
Instance Method Summary collapse
- #clear_cache ⇒ Object
-
#initialize(pattern = nil) ⇒ PathResolver
constructor
A new instance of PathResolver.
Methods inherited from Resolver
#find_all, #find_all_with_query
Constructor Details
#initialize(pattern = nil) ⇒ PathResolver
Returns a new instance of PathResolver.
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/action_view/template/resolver.rb', line 167 def initialize(pattern = nil) if pattern ActiveSupport::Deprecation.warn "Specifying a custom path for #{self.class} is deprecated. Implement a custom Resolver subclass instead." @pattern = pattern else @pattern = DEFAULT_PATTERN end @unbound_templates = Concurrent::Map.new super() end |
Instance Method Details
#clear_cache ⇒ Object
178 179 180 181 |
# File 'lib/action_view/template/resolver.rb', line 178 def clear_cache @unbound_templates.clear super() end |