Class: Dryv::Rules::Collection
- Inherits:
-
Binary
- Object
- Dryv::Rule
- Binary
- Dryv::Rules::Collection
- Defined in:
- lib/dryv/rules/collection.rb
Instance Attribute Summary
Attributes inherited from Dryv::Rule
Instance Method Summary collapse
Methods inherited from Binary
Methods inherited from Dryv::Rule
#+, #add_error, #and, #clone, #initialize, #name, #or, #then
Constructor Details
This class inherits a constructor from Dryv::Rule
Instance Method Details
#valid? ⇒ Boolean
5 6 7 8 9 10 11 12 |
# File 'lib/dryv/rules/collection.rb', line 5 def valid? is_valid = true [left, right].each do |rule| res = rule.valid? is_valid = res unless res end is_valid end |