Class: ActionView::FileSystemResolver
- Inherits:
-
PathResolver
- Object
- Resolver
- PathResolver
- ActionView::FileSystemResolver
- Defined in:
- actionview/lib/action_view/template/resolver.rb
Overview
A resolver that loads files from the filesystem.
Direct Known Subclasses
Constant Summary
Constants inherited from PathResolver
PathResolver::DEFAULT_PATTERN, PathResolver::EXTENSIONS
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #eql?(resolver) ⇒ Boolean (also: #==)
-
#initialize(path, pattern = nil) ⇒ FileSystemResolver
constructor
A new instance of FileSystemResolver.
- #to_s ⇒ Object (also: #to_path)
Methods inherited from PathResolver
Methods inherited from Resolver
#clear_cache, #find_all, #find_all_with_query
Constructor Details
#initialize(path, pattern = nil) ⇒ FileSystemResolver
Returns a new instance of FileSystemResolver.
295 296 297 298 299 |
# File 'actionview/lib/action_view/template/resolver.rb', line 295 def initialize(path, pattern = nil) raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver) super(pattern) @path = File.(path) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path
293 294 295 |
# File 'actionview/lib/action_view/template/resolver.rb', line 293 def path @path end |
Instance Method Details
#eql?(resolver) ⇒ Boolean Also known as: ==
306 307 308 |
# File 'actionview/lib/action_view/template/resolver.rb', line 306 def eql?(resolver) self.class.equal?(resolver.class) && to_path == resolver.to_path end |
#to_s ⇒ Object Also known as: to_path
301 302 303 |
# File 'actionview/lib/action_view/template/resolver.rb', line 301 def to_s @path.to_s end |