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 'doc/development/utilities.md')
-rw-r--r--doc/development/utilities.md16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/development/utilities.md b/doc/development/utilities.md
index 11de0d56ef3..38e416d68e4 100644
--- a/doc/development/utilities.md
+++ b/doc/development/utilities.md
@@ -2,7 +2,9 @@
We developed a number of utilities to ease development.
-## [`MergeHash`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/utils/merge_hash.rb)
+## `MergeHash`
+
+Refer to: <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/merge_hash.rb>:
- Deep merges an array of hashes:
@@ -45,7 +47,9 @@ We developed a number of utilities to ease development.
[:hello, "world", :this, :crushes, "an entire", "hash"]
```
-## [`Override`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/utils/override.rb)
+## `Override`
+
+Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/override.rb>:
- This utility could help us check if a particular method would override
another method or not. It has the same idea of Java's `@Override` annotation
@@ -90,7 +94,9 @@ We developed a number of utilities to ease development.
end
```
-## [`StrongMemoize`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/utils/strong_memoize.rb)
+## `StrongMemoize`
+
+Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/strong_memoize.rb>:
- Memoize the value even if it is `nil` or `false`.
@@ -136,7 +142,9 @@ We developed a number of utilities to ease development.
Find.new.clear_memoization(:result)
```
-## [`RequestCache`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/cache/request_cache.rb)
+## `RequestCache`
+
+Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/cache/request_cache.rb>.
This module provides a simple way to cache values in RequestStore,
and the cache key would be based on the class name, method name,