2018-10-26 00:12:43 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-14 06:10:09 -04:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Build
|
|
|
|
module Policy
|
|
|
|
def self.fabricate(specs)
|
|
|
|
specifications = specs.to_h.map do |spec, value|
|
2017-09-18 08:39:09 -04:00
|
|
|
self.const_get(spec.to_s.camelize).new(value)
|
2017-09-14 06:10:09 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
specifications.compact
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|