Commit 2d72efcd authored by Robert Speicher's avatar Robert Speicher

Add `count` to Themes and ColorSchemes

parent 6d43308b
...@@ -32,6 +32,11 @@ module Gitlab ...@@ -32,6 +32,11 @@ module Gitlab
SCHEMES.detect { |s| s.id == id } || default SCHEMES.detect { |s| s.id == id } || default
end end
# Returns the number of defined Schemes
def self.count
SCHEMES.size
end
# Get the default Scheme # Get the default Scheme
# #
# Returns a Scheme # Returns a Scheme
......
...@@ -37,6 +37,11 @@ module Gitlab ...@@ -37,6 +37,11 @@ module Gitlab
THEMES.detect { |t| t.id == id } || default THEMES.detect { |t| t.id == id } || default
end end
# Returns the number of defined Themes
def self.count
THEMES.size
end
# Get the default Theme # Get the default Theme
# #
# Returns a Theme # Returns a Theme
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment