Method: StackMaster::SparkleFormation::CompileTime::ParametersValidator#validate
- Defined in:
- lib/stack_master/sparkle_formation/compile_time/parameters_validator.rb
#validate ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/stack_master/sparkle_formation/compile_time/parameters_validator.rb', line 13 def validate @definitions.each do |name, definition| parameter = @parameters[name.to_s.camelize] factory = ValueValidatorFactory.new(name, definition, parameter) value_validators = factory.build value_validators.each do |validator| validator.validate raise ArgumentError.new "Invalid compile time parameter: #{validator.error}" unless validator.is_valid end end end |