Class: Dryv::Rules::And

Inherits:
Composite show all
Defined in:
lib/dryv/rules/and.rb

Instance Attribute Summary

Attributes inherited from Dryv::Rule

#args, #errors, #value

Instance Method Summary collapse

Methods inherited from Binary

#left, #right

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

Returns:

  • (Boolean)


5
6
7
# File 'lib/dryv/rules/and.rb', line 5

def valid?
  left.valid? && right.valid? ? true : false
end