class ActionView::PathSet

:nodoc:
A LookupContext will use a PathSet to store the paths in its context.
set and also perform operations on other PathSet objects.
operations are defined so that you can search among the paths in this
This class is used to store and access paths in Action View. A number of
= Action View PathSet
:nodoc:

def +(array)

def +(array)
  PathSet.new(paths + array)
end

def compact

def compact
  PathSet.new paths.compact
end

def exists?(path, prefixes, *args)

def exists?(path, prefixes, *args)
  find_all(path, prefixes, *args).any?
end

def find(*args)

def find(*args)
  find_all(*args).first || raise(MissingTemplate.new(self, *args))
end

def find_all(path, prefixes = [], *args)

def find_all(path, prefixes = [], *args)
  prefixes = [prefixes] if String === prefixes
  prefixes.each do |prefix|
    paths.each do |resolver|
      templates = resolver.find_all(path, prefix, *args)
      return templates unless templates.empty?
    end
  end
  []
end

def initialize(paths = [])

def initialize(paths = [])
  @paths = typecast paths
end

def initialize_copy(other)

def initialize_copy(other)
  @paths = other.paths.dup
  self
end

def to_ary

def to_ary
  paths.dup
end

def typecast(paths)

def typecast(paths)
  paths.map do |path|
    case path
    when Pathname, String
      OptimizedFileSystemResolver.new path.to_s
    else
      path
    end
  end
end