summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-06-24 11:36:32 -0500
committerRobert Speicher <rspeicher@gmail.com>2019-06-26 11:29:41 -0500
commit5ec2146c4a9b1be510055127375804c8ef652ed3 (patch)
tree95bed55ff9420b2a915309999b34e43627b667bd
parent8c89668d7d5a34bc7910d7b40aff2ef68739ed28 (diff)
downloadgitlab-ce-5ec2146c4a9b1be510055127375804c8ef652ed3.tar.gz
Add Gitlab.ee method
This method yields to the given block when the installation is EE.
-rw-r--r--lib/gitlab.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index fd4bbd69468..c62d1071dba 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -71,6 +71,10 @@ module Gitlab
end
end
+ def self.ee
+ yield if ee?
+ end
+
def self.http_proxy_env?
HTTP_PROXY_ENV_VARS.any? { |name| ENV[name] }
end