Sha256: 8ea5866f73da308267d10f4cbcadc031b32c631e70a4280e4252b8b43575349a
Contents?: true
Size: 638 Bytes
Versions: 14
Compression:
Stored size: 638 Bytes
Contents
module Distil module FileVendor def cache_file(file) @file_cache={} if @file_cache.nil? @file_cache[file.full_path]= file end def file_from_path(filepath) return if !filepath @file_cache={} if @file_cache.nil? full_path= File.expand_path(filepath) file= @file_cache[full_path] return file if file extension= File.extname(filepath)[1..-1] SourceFile.subclasses.each { |handler| next if (handler.extension != extension) return handler.new(filepath, self) } return SourceFile.new(filepath, self) end end end
Version data entries
14 entries across 14 versions & 1 rubygems