diff options
Diffstat (limited to 'lib/gitlab/ci/input/arguments/unknown.rb')
-rw-r--r-- | lib/gitlab/ci/input/arguments/unknown.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/gitlab/ci/input/arguments/unknown.rb b/lib/gitlab/ci/input/arguments/unknown.rb deleted file mode 100644 index 5873e6e66a6..00000000000 --- a/lib/gitlab/ci/input/arguments/unknown.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Ci - module Input - module Arguments - ## - # Input::Arguments::Unknown object gets fabricated when we can't match an input argument entry with any known - # specification. It is matched as the last one, and always returns an error. - # - class Unknown < Input::Arguments::Base - def validate! - if spec.is_a?(Hash) && spec.count == 1 - error("unrecognized input argument specification: `#{spec.each_key.first}`") - else - error('unrecognized input argument definition') - end - end - - def to_value - raise ArgumentError, 'unknown argument value' - end - - def self.matches?(*) - true - end - end - end - end - end -end |