Class: MCollective::Validator::ArrayValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/mcollective/validator/array_validator.rb

Class Method Summary collapse

Class Method Details

.validate(validator, array) ⇒ Object

Raises:



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