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 exists?: (String path, Array[String] prefixes, false partial, Hash details, ActionView::TemplateDetails::Requested details_key, Array[] locals) -> true
  def find: (String path, Array[String] prefixes, bool partial, Hash details, ActionView::TemplateDetails::Requested details_key, Array[] locals) -> ActionView::Template
  def find_all: (String path, Array[String] prefixes, bool partial, Hash details, ActionView::TemplateDetails::Requested details_key, Array[] locals) -> (Array[] | Array[ActionView::Template])
  def initialize: (?Array[ActionView::FileSystemResolver] paths) -> void
  def search_combinations: (Array[String] prefixes) -> nil
  def to_ary: () -> Array[ActionView::FileSystemResolver]
  def typecast: (Array[ActionView::FileSystemResolver] paths) -> Array[ActionView::FileSystemResolver]
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)

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

def exists?: (String path, String prefixes, false partial, (locale |  | formats |  | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol | locale |  | formats | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol) details, ActionView::TemplateDetails::Requested details_key,  locals) -> true

This signature was generated using 4 samples from 1 application.

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)

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

def find: (String path, ( | String) prefixes, bool partial, locale |  | formats |  | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol details, ActionView::TemplateDetails::Requested details_key,  locals) -> ActionView::Template

This signature was generated using 8 samples from 1 application.

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)

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

def find_all: (String path, ( | String) prefixes, bool partial, (locale |  | formats |  | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol | locale |  | formats | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | Symbol | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol) details, ActionView::TemplateDetails::Requested details_key,  locals) ->

This signature was generated using 11 samples from 2 applications.

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 = [])

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

def initialize: (?ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver paths) -> void

This signature was generated using 2 samples from 1 application.

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) -> nil

This signature was generated using 9 samples 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

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

def to_ary: () -> ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver

This signature was generated using 1 sample from 1 application.

def to_ary
  paths.dup
end

def typecast(paths)

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

def typecast: ((ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver) paths) -> (ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver | ActionView::FileSystemResolver)

This signature was generated using 3 samples from 1 application.

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