Commit 3bc0525a authored by Grzegorz Bizon's avatar Grzegorz Bizon

Extract compound statuses method in status factory

parent e66b0414
......@@ -12,9 +12,7 @@ module Gitlab
if extended_statuses.none?
core_status
else
extended_statuses.inject(core_status) do |status, extended|
extended.new(status)
end
compound_extended_status
end
end
......@@ -25,6 +23,12 @@ module Gitlab
.extend(self.class.common_helpers)
end
def compound_extended_status
extended_statuses.inject(core_status) do |status, extended|
extended.new(status)
end
end
def extended_statuses
return @extended_statuses if defined?(@extended_statuses)
......
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