class I18n::Tasks::Scanners::Files::CachingFileFinder
Finds the files in the specified search paths with support for exclusion / inclusion patterns. Wraps a {FileFinder} and caches the results.
@note This class is thread-safe. All methods are cached. @since 0.9.0
Public Class Methods
new(**args)
click to toggle source
@param (see FileFinder#initialize)
Calls superclass method
# File lib/i18n/tasks/scanners/files/caching_file_finder.rb, line 14 def initialize(**args) super @cached_value = ::I18n::Tasks::Concurrent::CachedValue.new { uncached_find_files } end
Public Instance Methods
find_files()
click to toggle source
@note This method is cached, it will only access the filesystem on the first invocation. @return (see FileFinder#find_files
)
# File lib/i18n/tasks/scanners/files/caching_file_finder.rb, line 31 def find_files @cached_value.get end
Also aliased as: uncached_find_files
uncached_find_files()
Traverse the paths and yield the matching ones.
@note This method is cached, it will only access the filesystem on the first invocation. @param (see FileFinder#traverse_files
) @yieldparam (see FileFinder#traverse_files
) @return (see FileFinder#traverse_files
)
Alias for: find_files