Class: MCollective::Validator::ArrayValidator
- Inherits:
-
Object
- Object
- MCollective::Validator::ArrayValidator
- Defined in:
- lib/mcollective/validator/array_validator.rb
Class Method Summary collapse
Class Method Details
.validate(validator, array) ⇒ Object
4 5 6 |
# File 'lib/mcollective/validator/array_validator.rb', line 4 def self.validate(validator, array) raise ValidatorError, "value should be one of %s" % [array.join(", ")] unless array.include?(validator) end |