跳至内容 跳至搜索
方法
N

常量

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

属性

[R] 格式
[R] formats_idx
[R] 处理程序
[R] handlers_idx
[R] 语言环境
[R] locale_idx
[R] 变体
[R] variants_idx

类公共方法

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