diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/color_schemes.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/themes.rb | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/color_schemes.rb b/lib/gitlab/color_schemes.rb index 763853ab1cb..9c4664df903 100644 --- a/lib/gitlab/color_schemes.rb +++ b/lib/gitlab/color_schemes.rb @@ -32,6 +32,11 @@ module Gitlab SCHEMES.detect { |s| s.id == id } || default end + # Returns the number of defined Schemes + def self.count + SCHEMES.size + end + # Get the default Scheme # # Returns a Scheme diff --git a/lib/gitlab/themes.rb b/lib/gitlab/themes.rb index 37a36b9599b..83f91de810c 100644 --- a/lib/gitlab/themes.rb +++ b/lib/gitlab/themes.rb @@ -37,6 +37,11 @@ module Gitlab THEMES.detect { |t| t.id == id } || default end + # Returns the number of defined Themes + def self.count + THEMES.size + end + # Get the default Theme # # Returns a Theme |