Class: Cliqr::Config::Validation::ValidatorFactory::InclusionValidator Private

Inherits:
NonNilValidator show all
Defined in:
lib/cliqr/config/validation/validator_factory.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Validate that a attribute value is included in a predefined set

Instance Method Summary collapse

Methods inherited from Validator

#validate

Constructor Details

#initialize(allowed_values) ⇒ InclusionValidator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a new inclusion validator

Parameters:

  • allowed_values (Array<Symbol>)

    A set of allowed values



281
282
283
# File 'lib/cliqr/config/validation/validator_factory.rb', line 281

def initialize(allowed_values)
  @allowed_values = allowed_values
end