diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-04 22:02:01 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-09 21:13:08 +0800 |
commit | 3bfe30662436e48d4324b8fac5c1634df4a7cf7f (patch) | |
tree | 3f772a44196e249ded23b453b89799095cbcc5d8 /app/models | |
parent | 9286f5b9340f92131c320c231a5fb3e51c23bf04 (diff) | |
download | gitlab-ce-3bfe30662436e48d4324b8fac5c1634df4a7cf7f.tar.gz |
Resolve Naming/UncommunicativeMethod
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/network/commit.rb | 4 | ||||
-rw-r--r-- | app/models/repository.rb | 10 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/app/models/network/commit.rb b/app/models/network/commit.rb index 22d48c9e661..d667948deae 100644 --- a/app/models/network/commit.rb +++ b/app/models/network/commit.rb @@ -11,8 +11,8 @@ module Network @parent_spaces = [] end - def method_missing(m, *args, &block) - @commit.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend + def method_missing(msg, *args, &block) + @commit.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend end def space diff --git a/app/models/repository.rb b/app/models/repository.rb index 7cd600fec5b..5ed2a7b4068 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -462,12 +462,12 @@ class Repository expire_branches_cache end - def method_missing(m, *args, &block) - if m == :lookup && !block_given? - lookup_cache[m] ||= {} - lookup_cache[m][args.join(":")] ||= raw_repository.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend + def method_missing(msg, *args, &block) + if msg == :lookup && !block_given? + lookup_cache[msg] ||= {} + lookup_cache[msg][args.join(":")] ||= raw_repository.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend else - raw_repository.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend + raw_repository.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend end end diff --git a/app/models/user.rb b/app/models/user.rb index 47542ab122a..1c5d39db118 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1333,8 +1333,8 @@ class User < ActiveRecord::Base end end - def self.unique_internal(scope, username, email_pattern, &b) - scope.first || create_unique_internal(scope, username, email_pattern, &b) + def self.unique_internal(scope, username, email_pattern, &block) + scope.first || create_unique_internal(scope, username, email_pattern, &block) end def self.create_unique_internal(scope, username, email_pattern, &creation_block) |