class ActionView::LookupContext::DetailsKey

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

# sig/action_view/lookup_context.rbs

class ActionView::LookupContext::DetailsKey
  def self.clear: () -> Concurrent::Map
  def self.details_cache_key: (Hash details) -> ActionView::TemplateDetails::Requested
  def self.view_context_class: (Class klass) -> Class
end

:nodoc:

def self.clear

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

def self.clear: () -> Concurrent::Map

This signature was generated using 2 samples from 1 application.

def self.clear
  ActionView::ViewPaths.all_view_paths.each do |path_set|
    path_set.each(&:clear_cache)
  end
  @view_context_class = nil
  @details_keys.clear
  @digest_cache.clear
end

def self.details_cache_key(details)

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

def self.details_cache_key: ((locale |  | formats |  | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol | locale |  | formats | Symbol | variants |  | handlers | Symbol | Symbol | Symbol | Symbol | Symbol) details) -> ActionView::TemplateDetails::Requested

This signature was generated using 5 samples from 1 application.

def self.details_cache_key(details)
  if details[:formats]
    details = details.dup
    details[:formats] &= Template::Types.symbols
  end
  @details_keys[details] ||= TemplateDetails::Requested.new(**details)
end

def self.digest_cache(details)

def self.digest_cache(details)
  @digest_cache[details_cache_key(details)] ||= Concurrent::Map.new
end

def self.digest_caches

def self.digest_caches
  @digest_cache.values
end

def self.view_context_class(klass)

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

def self.view_context_class: (Class klass) -> Class

This signature was generated using 2 samples from 1 application.

def self.view_context_class(klass)
  @view_context_mutex.synchronize do
    @view_context_class ||= klass.with_empty_template_cache
  end
end