Class: Qonfig::Validation::Validators::Composite Private
- Inherits:
-
Object
- Object
- Qonfig::Validation::Validators::Composite
- Defined in:
- lib/qonfig/validation/validators/composite.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.
Instance Method Summary collapse
- #initialize(data_set) ⇒ void constructor private
- #valid? ⇒ Boolean private
- #validate! ⇒ void private
Constructor Details
#initialize(data_set) ⇒ void
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.
11 12 13 14 |
# File 'lib/qonfig/validation/validators/composite.rb', line 11 def initialize(data_set) @data_set = data_set @validators = data_set.class.validators.dup end |
Instance Method Details
#valid? ⇒ Boolean
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.
30 31 32 33 34 35 |
# File 'lib/qonfig/validation/validators/composite.rb', line 30 def valid? validate! true rescue Qonfig::ValidationError false end |
#validate! ⇒ void
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.
This method returns an undefined value.
20 21 22 23 24 |
# File 'lib/qonfig/validation/validators/composite.rb', line 20 def validate! validators.each do |validator| validator.validate(data_set) end end |