Class: ActionView::Resolver

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

Overview

Action View Resolver

Direct Known Subclasses

PathResolver

Defined Under Namespace

Classes: Cache, Path

Instance Method Summary collapse

Constructor Details

#initializeResolver

Returns a new instance of Resolver.



105
106
107
# File 'lib/action_view/template/resolver.rb', line 105

def initialize
  @cache = Cache.new
end

Instance Method Details

#clear_cacheObject



109
110
111
# File 'lib/action_view/template/resolver.rb', line 109

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.



114
115
116
117
118
# File 'lib/action_view/template/resolver.rb', line 114

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, false)
  end
end

#find_all_anywhere(name, prefix, partial = false, details = {}, key = nil, locals = []) ⇒ Object



120
121
122
123
124
# File 'lib/action_view/template/resolver.rb', line 120

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