class ActionView::PathSet
def typecast(paths)
def typecast(paths) paths.map do |path| case path when Pathname, String # This path should only be reached by "direct" users of # ActionView::Base (not using the ViewPaths or Renderer modules). # We can't cache/de-dup the file system resolver in this case as we # don't know which compiled_method_container we'll be rendering to. FileSystemResolver.new(path) when Resolver path else raise TypeError, "#{path.inspect} is not a valid path: must be a String, Pathname, or Resolver" end end end