Module: Sensu::Settings::Validators::Mutator

Included in:
Sensu::Settings::Validators
Defined in:
lib/sensu/settings/validators/mutator.rb

Instance Method Summary collapse

Instance Method Details

#validate_mutator(mutator) ⇒ Object

Validate a Sensu mutator definition. Validates: command, timeout


9
10
11
12
13
14
# File 'lib/sensu/settings/validators/mutator.rb', line 9

def validate_mutator(mutator)
  must_be_a_string(mutator[:command]) ||
    invalid(mutator, "mutator command must be a string")
  must_be_a_numeric_if_set(mutator[:timeout]) ||
    invalid(mutator, "mutator timeout must be numeric")
end