Commit 3474e109 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Simplify code for appending strategies in CI/CD config

parent 808fb254
...@@ -21,12 +21,12 @@ module Gitlab ...@@ -21,12 +21,12 @@ module Gitlab
def self.strategy(name, **opts) def self.strategy(name, **opts)
EntryStrategy.new(name, opts.fetch(:if)).tap do |strategy| EntryStrategy.new(name, opts.fetch(:if)).tap do |strategy|
(@strategies ||= []).append(strategy) strategies.append(strategy)
end end
end end
def self.strategies def self.strategies
@strategies.to_a @strategies ||= []
end end
def self.entry_class(strategy) def self.entry_class(strategy)
......
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