Skip to content
Snippets Groups Projects
Commit 3bc0525a authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Extract compound statuses method in status factory

parent e66b0414
No related branches found
No related tags found
No related merge requests found
Loading
@@ -12,9 +12,7 @@ module Gitlab
Loading
@@ -12,9 +12,7 @@ module Gitlab
if extended_statuses.none? if extended_statuses.none?
core_status core_status
else else
extended_statuses.inject(core_status) do |status, extended| compound_extended_status
extended.new(status)
end
end end
end end
   
Loading
@@ -25,6 +23,12 @@ module Gitlab
Loading
@@ -25,6 +23,12 @@ module Gitlab
.extend(self.class.common_helpers) .extend(self.class.common_helpers)
end end
   
def compound_extended_status
extended_statuses.inject(core_status) do |status, extended|
extended.new(status)
end
end
def extended_statuses def extended_statuses
return @extended_statuses if defined?(@extended_statuses) return @extended_statuses if defined?(@extended_statuses)
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment