class ActiveSupport::HashWithIndifferentAccess

def convert_value(value, conversion: nil)

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

def convert_value: (String value, conversion: Symbol) -> untyped

This signature was generated using 1 sample from 1 application.

def convert_value(value, conversion: nil)
  if value.is_a? Hash
    if conversion == :to_hash
      value.to_hash
    else
      value.nested_under_indifferent_access
    end
  elsif value.is_a?(Array)
    if conversion != :assignment || value.frozen?
      value = value.dup
    end
    value.map! { |e| convert_value(e, conversion: conversion) }
  else
    value
  end
end