Class: StackMaster::SparkleFormation::CompileTime::ValueValidatorFactory
- Inherits:
-
Object
- Object
- StackMaster::SparkleFormation::CompileTime::ValueValidatorFactory
- Defined in:
- lib/stack_master/sparkle_formation/compile_time/value_validator_factory.rb
Constant Summary collapse
- VALIDATORS_TYPES =
[ EmptyValidator, StringValidator, NumberValidator, AllowedValuesValidator, AllowedPatternValidator, MaxLengthValidator, MinLengthValidator, MaxSizeValidator, MinSizeValidator ]
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(name, definition, parameter) ⇒ ValueValidatorFactory
constructor
A new instance of ValueValidatorFactory.
Constructor Details
#initialize(name, definition, parameter) ⇒ ValueValidatorFactory
Returns a new instance of ValueValidatorFactory.
28 29 30 31 32 |
# File 'lib/stack_master/sparkle_formation/compile_time/value_validator_factory.rb', line 28 def initialize(name, definition, parameter) @name = name @definition = definition @parameter = parameter end |
Instance Method Details
#build ⇒ Object
34 35 36 |
# File 'lib/stack_master/sparkle_formation/compile_time/value_validator_factory.rb', line 34 def build VALIDATORS_TYPES.map { |validator| validator.new(@name, @definition, @parameter)} end |