Welcome to mirror list, hosted at ThFree Co, Russian Federation.

number_input.rb « inputs « interpolation « config « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 314315d2b6d8500bbeba9d59af45d074097e2d77 (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
# frozen_string_literal: true

module Gitlab
  module Ci
    class Config
      module Interpolation
        class Inputs
          class NumberInput < BaseInput
            def self.matches?(spec)
              spec.is_a?(Hash) && spec[:type] == type_name
            end

            def self.type_name
              'number'
            end

            def valid_value?(value)
              value.is_a?(Numeric)
            end
          end
        end
      end
    end
  end
end