method

typecast

Importance_0
typecast(paths) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.