require 'fiona7/obj_class_name_mangler' module Fiona7 class ForbiddenObjClasses SYSTEM_CLASSES = ['X_Generic', 'X_Image', 'X_Container'].freeze def call self.system_obj_classes + self.widget_obj_classes end def all self.call end def system_obj_classes SYSTEM_CLASSES end def widget_obj_classes # NOTE: to_s handles shadow classes properly widget_classes = Scrivito.models.widgets.map(&:to_s) widget_classes.map do |obj_class| Fiona7::ObjClassNameMangler.new(obj_class).mangle end end end end