Class: ActionView::FileSystemResolver
- Defined in:
 - lib/action_view/template/resolver.rb
 
Overview
A resolver that loads files from the filesystem.
Direct Known Subclasses
Constant Summary
Constants inherited from Resolver
Instance Attribute Summary collapse
- 
  
    
      #path  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute path.
 
Instance Method Summary collapse
- 
  
    
      #all_template_paths  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
:nodoc:.
 - #clear_cache ⇒ Object
 - #eql?(resolver) ⇒ Boolean (also: #==)
 - 
  
    
      #initialize(path)  ⇒ FileSystemResolver 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of FileSystemResolver.
 - #to_s ⇒ Object (also: #to_path)
 
Methods inherited from Resolver
Constructor Details
#initialize(path) ⇒ FileSystemResolver
Returns a new instance of FileSystemResolver.
      92 93 94 95 96 97 98  | 
    
      # File 'lib/action_view/template/resolver.rb', line 92 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.(path) super() end  | 
  
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
      90 91 92  | 
    
      # File 'lib/action_view/template/resolver.rb', line 90 def path @path end  | 
  
Instance Method Details
#all_template_paths ⇒ Object
:nodoc:
      116 117 118 119 120 121 122 123  | 
    
      # File 'lib/action_view/template/resolver.rb', line 116 def all_template_paths # :nodoc: paths = template_glob("**/*") paths.map do |filename| filename.from(@path.size + 1).remove(/\.[^\/]*\z/) end.uniq.map do |filename| TemplatePath.parse(filename) end end  | 
  
#clear_cache ⇒ Object
      100 101 102 103 104  | 
    
      # File 'lib/action_view/template/resolver.rb', line 100 def clear_cache @unbound_templates.clear @path_parser = PathParser.new super end  | 
  
#eql?(resolver) ⇒ Boolean Also known as: ==
      111 112 113  | 
    
      # File 'lib/action_view/template/resolver.rb', line 111 def eql?(resolver) self.class.equal?(resolver.class) && to_path == resolver.to_path end  | 
  
#to_s ⇒ Object Also known as: to_path
      106 107 108  | 
    
      # File 'lib/action_view/template/resolver.rb', line 106 def to_s @path.to_s end  |