class ActionView::PathSet

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/action_view/path_set.rbs

class ActionView::PathSet
  def search_combinations: (Array[String] prefixes) -> untyped
end

: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, partial, details, details_key, locals)

def exists?(path, prefixes, partial, details, details_key, locals)
  find_all(path, prefixes, partial, details, details_key, locals).any?
end

def find(path, prefixes, partial, details, details_key, locals)

def find(path, prefixes, partial, details, details_key, locals)
  find_all(path, prefixes, partial, details, details_key, locals).first ||
    raise(MissingTemplate.new(self, path, prefixes, partial, details, details_key, locals))
end

def find_all(path, prefixes, partial, details, details_key, locals)

def find_all(path, prefixes, partial, details, details_key, locals)
  search_combinations(prefixes) do |resolver, prefix|
    templates = resolver.find_all(path, prefix, partial, details, details_key, locals)
    return templates unless templates.empty?
  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 search_combinations(prefixes)

Experimental RBS support (using type sampling data from the type_fusion project).

def search_combinations: (String prefixes) -> untyped

This signature was generated using 1 sample from 1 application.

def search_combinations(prefixes)
  prefixes = Array(prefixes)
  prefixes.each do |prefix|
    paths.each do |resolver|
      yield resolver, prefix
    end
  end
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
      FileSystemResolver.new path.to_s
    else
      path
    end
  end
end