summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/pipeline/expression/lexeme/null.rb
blob: e7f7945532b1c8a4ee4d38bd961c87705d286026 (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
30
31
# frozen_string_literal: true

module Gitlab
  module Ci
    module Pipeline
      module Expression
        module Lexeme
          class Null < Lexeme::Value
            PATTERN = /null/.freeze

            def initialize(value = nil)
              super
            end

            def evaluate(variables = {})
              nil
            end

            def inspect
              'null'
            end

            def self.build(_value)
              self.new
            end
          end
        end
      end
    end
  end
end