class WolfCore::InstanceApplicationSerializer

def serialized_relationships

def serialized_relationships
  self.class._relationships.each_with_object({}) do |(key, serializer_class), hash|
    serializer = serializer_class.new(options: @options)
    related_object = @object.public_send(key)
    hash[key] = if related_object.is_a?(Enumerable)
                  serializer.serialize_all(collection: related_object)
                else
                  serializer.serialize(object: related_object)
                end
  end
end