Class: Gitlab::Ci::Config::Normalizer::Factory

Inherits:
Object
  • Object
show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/ci/config/normalizer/factory.rb

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

#initialize(name, config) ⇒ Factory

Returns a new instance of Factory.


10
11
12
13
# File 'lib/gitlab/ci/config/normalizer/factory.rb', line 10

def initialize(name, config)
  @name = name
  @config = config
end

Instance Method Details

#createObject


15
16
17
18
19
# File 'lib/gitlab/ci/config/normalizer/factory.rb', line 15

def create
  return [] unless strategy

  strategy.build_from(@name, @config)
end