Method: Dassets::SourceFile.find_by_digest_path
- Defined in:
- lib/dassets/source_file.rb
.find_by_digest_path(path, cache = nil) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/dassets/source_file.rb', line 10 def self.find_by_digest_path(path, cache = nil) # look in the configured source list source_files = Dassets.source_list.map{ |p| self.new(p) } # get the last matching one (in case two source files have the same digest # path the last one *should* be correct since it was last to be configured) source_files.select{ |s| s.digest_path == path }.last || NullSourceFile.new(path, cache) end |