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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 03:09:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 03:09:33 +0300
commitb56027c9d80ac0e297ba8a43c81e8504172dbf9f (patch)
treeb85f743277145e930ae195664655d696e6e0a7fc /lib/gitlab/repository_size_checker.rb
parent7915c41e4261719719e791602c8235574157164c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/repository_size_checker.rb')
-rw-r--r--lib/gitlab/repository_size_checker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/repository_size_checker.rb b/lib/gitlab/repository_size_checker.rb
index cf1af844439..82c57f7a07d 100644
--- a/lib/gitlab/repository_size_checker.rb
+++ b/lib/gitlab/repository_size_checker.rb
@@ -5,12 +5,14 @@ module Gitlab
class RepositorySizeChecker
attr_reader :limit
+ # @param current_size_proc [Proc] returns repository size in bytes
def initialize(current_size_proc:, limit:, enabled: true)
@current_size_proc = current_size_proc
@limit = limit
@enabled = enabled && limit != 0
end
+ # @return [Integer] bytes
def current_size
@current_size ||= @current_size_proc.call
end