class Hash

def _deep_transform_keys_in_object(object, &block)

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

def _deep_transform_keys_in_object: ((Array[String] | String) object, ) -> String

This signature was generated using 20 samples from 1 application.

Support methods for deep transforming nested hashes and arrays.
def _deep_transform_keys_in_object(object, &block)
  case object
  when Hash
    object.each_with_object(self.class.new) do |(key, value), result|
      result[yield(key)] = _deep_transform_keys_in_object(value, &block)
    end
  when Array
    object.map { |e| _deep_transform_keys_in_object(e, &block) }
  else
    object
  end
end