123456789_123456789_123456789_123456789_123456789_

Class: ActionView::FileSystemResolver

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Resolver
Instance Chain:
Inherits: ActionView::Resolver
Defined in: actionview/lib/action_view/template/resolver.rb

Overview

A resolver that loads files from the filesystem.

Class Attribute Summary

Resolver - Inherited

Class Method Summary

Instance Attribute Summary

Resolver - Inherited

Instance Method Summary

Resolver - Inherited

#caching?, #clear_cache,
#find_all

Normalizes the arguments and passes it on to find_templates.

Constructor Details

.new(path) ⇒ FileSystemResolver

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 96

def initialize(path)
  raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver)
  @unbound_templates = Concurrent::Map.new
  @path_parser = PathParser.new
  @path = File.expand_path(path)
  super()
end

Instance Attribute Details

#path (readonly)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 94

attr_reader :path

Instance Method Details

#==(resolver)

Alias for #eql?.

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 118

alias :== :eql?

#clear_cache

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 104

def clear_cache
  @unbound_templates.clear
  @path_parser = PathParser.new
  super
end

#eql?(resolver) ⇒ Boolean Also known as: #==

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 115

def eql?(resolver)
  self.class.equal?(resolver.class) && to_path == resolver.to_path
end

#to_path

Alias for #to_s.

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 113

alias :to_path :to_s

#to_s Also known as: #to_path

[ GitHub ]

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

def to_s
  @path.to_s
end