method
typecast
v7.2.3 -
Show latest stable
- Class:
ActionView::PathSet
typecast(paths)private
No documentation available.
# File actionview/lib/action_view/path_set.rb, line 67
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