diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 00:09:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 00:09:33 +0000 |
commit | b56027c9d80ac0e297ba8a43c81e8504172dbf9f (patch) | |
tree | b85f743277145e930ae195664655d696e6e0a7fc /lib/gitlab/repository_size_checker.rb | |
parent | 7915c41e4261719719e791602c8235574157164c (diff) | |
download | gitlab-ce-b56027c9d80ac0e297ba8a43c81e8504172dbf9f.tar.gz |
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.rb | 2 |
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 |