class ActionView::Resolver - actionview-4.2.4 Documentation

# class ActionView::Resolver

# Action View Resolver¶ ↑

### Public Class Methods

new() click to toggle source

    # File lib/action_view/template/resolver.rb, line 105
    def initialize
      @cache = Cache.new
    end

### Public Instance Methods

clear_cache() click to toggle source

    # 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=[]) click to toggle source

Normalizes the arguments and passes it on to find_templates.

    # 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)
      end
    end

### Private Instance Methods

build_path(name, prefix, partial) click to toggle source

Helpers that builds a path. Useful for building virtual paths.

    # File lib/action_view/template/resolver.rb, line 132
    def build_path(name, prefix, partial)
      Path.build(name, prefix, partial)
    end

find_templates(name, prefix, partial, details) click to toggle source

This is what child classes implement. No defaults are needed because Resolver guarantees that the arguments are present and normalized.

    # File lib/action_view/template/resolver.rb, line 127
    def find_templates(name, prefix, partial, details)
      raise NotImplementedError, "Subclasses must implement a find_templates(name, prefix, partial, details) method"
    end