module JsonbAccessor::ClassBuilder

def generate_nested_classes(klass, nested_attributes)

def generate_nested_classes(klass, nested_attributes)
  nested_attributes.each_with_object({}) do |(attribute_name, nested_attrs), nested_classes|
    nested_classes[attribute_name] = generate_class(klass, attribute_name, nested_attrs)
  end
end