Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/concerns/find_closest.rb')
-rw-r--r--app/graphql/types/concerns/find_closest.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/app/graphql/types/concerns/find_closest.rb b/app/graphql/types/concerns/find_closest.rb
deleted file mode 100644
index 3064db19ea0..00000000000
--- a/app/graphql/types/concerns/find_closest.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-module FindClosest
- # Find the closest node which has any of the given types above this node, and return the domain object
- def closest_parent(types, parent)
- while parent
-
- if types.any? {|type| parent.object.instance_of? type}
- return parent.object.object
- else
- parent = parent.try(:parent)
- end
- end
- end
-end