class ActionView::LookupContext

def formats=(values)

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

def formats=: (Array[Symbol] values, Array[Symbol] value) -> Array[Symbol]

This signature was generated using 4 samples from 1 application.

add :html as fallback to :js.
Override formats= to expand ["*/*"] values and automatically
def formats=(values)
  if values
    values = values.dup
    values.concat(default_formats) if values.delete "*/*"
    values.uniq!
    invalid_values = (values - Template::Types.symbols)
    unless invalid_values.empty?
      raise ArgumentError, "Invalid formats: #{invalid_values.map(&:inspect).join(", ")}"
    end
    if values == [:js]
      values << :html
      @html_fallback_for_js = true
    end
  end
  super(values)
end