Class: Gitlab::Ci::Config::Interpolation::Inputs::NumberInput
- Inherits:
-
BaseInput
- Object
- BaseInput
- Gitlab::Ci::Config::Interpolation::Inputs::NumberInput
- Defined in:
- lib/gitlab/ci/config/interpolation/inputs/number_input.rb
Constant Summary
Constants inherited from BaseInput
BaseInput::ArgumentNotValidError
Instance Attribute Summary
Attributes inherited from BaseInput
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseInput
#initialize, #to_hash, #valid?
Constructor Details
This class inherits a constructor from Gitlab::Ci::Config::Interpolation::Inputs::BaseInput
Class Method Details
.matches?(spec) ⇒ Boolean
9 10 11 |
# File 'lib/gitlab/ci/config/interpolation/inputs/number_input.rb', line 9 def self.matches?(spec) spec.is_a?(Hash) && spec[:type] == type_name end |
.type_name ⇒ Object
13 14 15 |
# File 'lib/gitlab/ci/config/interpolation/inputs/number_input.rb', line 13 def self.type_name 'number' end |
Instance Method Details
#valid_value?(value) ⇒ Boolean
17 18 19 |
# File 'lib/gitlab/ci/config/interpolation/inputs/number_input.rb', line 17 def valid_value?(value) value.is_a?(Numeric) end |