summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/pipeline/chain/config/content/parameter.rb
blob: 9954aedc4b702aac33acf968fa1fcbae4c1c7f27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

module Gitlab
  module Ci
    module Pipeline
      module Chain
        module Config
          class Content
            class Parameter < Source
              UnsupportedSourceError = Class.new(StandardError)

              def content
                strong_memoize(:content) do
                  next unless command.content.present?

                  command.content
                end
              end

              def source
                :parameter_source
              end
            end
          end
        end
      end
    end
  end
end