class ClassVariants::Instance

def expand_boolean_variants(variants)

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

def expand_boolean_variants: (Hash variants) -> nil

This signature was generated using 1 sample from 1 application.

def expand_boolean_variants(variants)
  variants.each.map { |key, value|
    case value
    when String
      s_key = key.to_s
      { s_key.delete_prefix("!").to_sym => { !s_key.start_with?("!") => value } }
    else
      { key => value }
    end
  }.reduce do |variants, more_variants|
    variants.merge!(more_variants) { |_key, v1, v2| v1.merge!(v2) }
  end
end