method
typecast
Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: ActionView::PathSet
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
typecast(paths)
private
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