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.26.5 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.26.4 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.26.3 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.26.2 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.26.1 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.26.0 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.25.3 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.25.2 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.25.1 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.25.0 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.24.4 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.24.3 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.24.2 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.24.1 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.24.0 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.23.3 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.23.2 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.23.1 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.23.0 lib/mcollective/validator/array_validator.rb
choria-mcorpc-support-2.23.0.pre lib/mcollective/validator/array_validator.rb