diff options
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 |