class ViewModel::Registry

def resolve_deferred_classes

def resolve_deferred_classes
  until @deferred_viewmodel_classes.empty?
    vm, view_name = @deferred_viewmodel_classes.pop
    if vm.should_register?
      view_name = vm.view_name if view_name == DEFERRED_NAME
      @viewmodel_classes_by_name[view_name] = vm
    end
  end
end