summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-10-06 10:48:22 -0700
committerMichael Kozono <mkozono@gmail.com>2017-10-07 10:28:13 -0700
commite0a0c6b04ebcd92640cd9a840c5a45ec39d0d59a (patch)
tree0b3b21952fbeb755a2ec6ceeaaa23cdb193cfc48
parent8c29a04549d4a956508ef9a92a043a309978fa34 (diff)
downloadgitlab-ce-e0a0c6b04ebcd92640cd9a840c5a45ec39d0d59a.tar.gz
Make internal methods private
-rw-r--r--lib/gitlab/ldap/dn.rb42
1 files changed, 22 insertions, 20 deletions
diff --git a/lib/gitlab/ldap/dn.rb b/lib/gitlab/ldap/dn.rb
index c469420f1f9..ad66f5e96e4 100644
--- a/lib/gitlab/ldap/dn.rb
+++ b/lib/gitlab/ldap/dn.rb
@@ -48,26 +48,6 @@ module Gitlab
end
end
- def initialize_array(args)
- buffer = StringIO.new
-
- args.each_with_index do |arg, index|
- if index.even? # key
- buffer << "," if index > 0
- buffer << arg
- else # value
- buffer << "="
- buffer << self.class.escape(arg)
- end
- end
-
- @dn = buffer.string
- end
-
- def initialize_string(arg)
- @dn = arg.to_s
- end
-
##
# Parse a DN into key value pairs using ASN from
# http://tools.ietf.org/html/rfc2253 section 3.
@@ -281,6 +261,28 @@ module Gitlab
escaped.gsub(HEX_ESCAPE_RE) { |char| HEX_ESCAPES[char] }
end
+ private
+
+ def initialize_array(args)
+ buffer = StringIO.new
+
+ args.each_with_index do |arg, index|
+ if index.even? # key
+ buffer << "," if index > 0
+ buffer << arg
+ else # value
+ buffer << "="
+ buffer << self.class.escape(arg)
+ end
+ end
+
+ @dn = buffer.string
+ end
+
+ def initialize_string(arg)
+ @dn = arg.to_s
+ end
+
##
# Proxy all other requests to the string object, because a DN is mainly
# used within the library as a string