summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-16 13:10:51 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-16 13:10:51 +0000
commitbd00d16d0f5d10cdb4e60b069ca51866127767b7 (patch)
tree6ba915a5fa6a52be6c621ac22a39e4c77a6d8b90 /app
parent03e719b12b7f5a97bc808f18349699c761487677 (diff)
downloadredmine-bd00d16d0f5d10cdb4e60b069ca51866127767b7.tar.gz
redmine-bd00d16d0f5d10cdb4e60b069ca51866127767b7.zip
rubocop: fix Lint/IneffectiveAccessModifier in app/models/auth_source_ldap.rb (#32470)
git-svn-id: http://svn.redmine.org/redmine/trunk@19085 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/auth_source_ldap.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb
index 3c55bff75..aba76a6fc 100644
--- a/app/models/auth_source_ldap.rb
+++ b/app/models/auth_source_ldap.rb
@@ -244,10 +244,13 @@ class AuthSourceLdap < AuthSource
attrs
end
- def self.get_attr(entry, attr_name)
- if !attr_name.blank?
- value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
- value.to_s.force_encoding('UTF-8')
+ # Singleton class method is public
+ class << self
+ def get_attr(entry, attr_name)
+ if !attr_name.blank?
+ value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
+ value.to_s.force_encoding('UTF-8')
+ end
end
end
end