Sha256: e01fed66a9cb95114589993ca46ab77aadf3dcf7d0436288604827aae66d9b51

Contents?: true

Size: 245 Bytes

Versions: 26

Compression:

Stored size: 245 Bytes

Contents

module MCollective
  module Validator
    class ArrayValidator
      def self.validate(validator, array)
        raise ValidatorError, "value should be one of %s" % [array.join(", ")] unless array.include?(validator)
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
choria-mcorpc-support-2.22.1 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.22.0 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.21.1 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.21.0 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.20.8 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.20.7 lib/mcollective/validator/array_validator.rb