Skip to Content Skip to Search
Methods
N

Constants

ANY_HASH = Hash.new(1).merge(nil => 0).freeze
 

Attributes

[R] formats
[R] formats_idx
[R] handlers
[R] handlers_idx
[R] locale
[R] locale_idx
[R] variants
[R] variants_idx

Class Public methods

new(locale:, handlers:, formats:, variants:)

# File actionview/lib/action_view/template_details.rb, line 11
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