Class: Optimist::ConflictConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Optimist::ConflictConstraint
- Defined in:
- lib/optimist.rb
Overview
A Conflict constraint. Useful when Option A cannot be used with Option B.
Instance Method Summary collapse
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Optimist::Constraint
Instance Method Details
#error_condition(overlap_size) ⇒ Object
66 67 68 |
# File 'lib/optimist.rb', line 66 def error_condition(overlap_size) (overlap_size != 0) && (overlap_size != 1) end |
#error_message(longargs) ⇒ Object
69 70 71 |
# File 'lib/optimist.rb', line 69 def (longargs) "only one of #{longargs.join(', ')} can be given" end |