summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/build/policy.rb
blob: d10cc7802d4aa755fcf2bfb11018d0b3fc9ec732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Gitlab
  module Ci
    module Build
      module Policy
        def self.fabricate(specs)
          specifications = specs.to_h.map do |spec, value|
            self.const_get(spec.to_s.camelize).new(value)
          end

          specifications.compact
        end
      end
    end
  end
end