Module: Sensu::Settings::Validators::Extension

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

Instance Method Summary collapse

Instance Method Details

#validate_extension(extension) ⇒ Object

Validate a Sensu extension definition. Validates: gem, version

Parameters:

  • filter (Hash)

    sensu extension definition.


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

def validate_extension(extension)
  must_be_a_string_if_set(extension[:gem]) ||
    invalid(extension, "extension gem must be a string")
  must_be_a_string_if_set(extension[:version]) ||
    invalid(extension, "extension version must be a string")
end