class ActionView::TemplateDetails::Requested

:nodoc:

def build_idx_hash(arr)

def build_idx_hash(arr)
  [*arr, nil].each_with_index.to_h.freeze
end

def initialize(locale:, handlers:, formats:, variants:)

def initialize(locale:, handlers:, formats:, variants:)
  @locale = locale
  @handlers = handlers
  @formats = formats
  @variants = variants
  @locale_idx   = build_idx_hash(locale)
  @handlers_idx = build_idx_hash(handlers)
  @formats_idx  = build_idx_hash(formats)
  if variants == :any
    @variants_idx = ANY_HASH
  else
    @variants_idx = build_idx_hash(variants)
  end
end