提交 37b77c6a 编写于 作者: A Aaron Patterson

refactor the optimized build_query a bit

上级 128467e9
......@@ -237,15 +237,10 @@ def eql?(resolver)
class OptimizedFileSystemResolver < FileSystemResolver #:nodoc:
def build_query(path, details)
exts = EXTENSIONS.map { |ext| details[ext] }
query = File.join(@path, path)
exts.each do |ext|
query << "{"
ext.compact.uniq.each { |e| query << ".#{e}," }
query << "}"
end
query
File.join(@path, path) + exts.map { |ext|
"{#{ext.compact.uniq.map { |e| ".#{e}," }.join}}"
}.join
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册