Class: Vanguard::Matcher::Binary::XOR

Inherits:
Vanguard::Matcher::Binary show all
Defined in:
lib/vanguard/matcher/binary/xor.rb

Overview

Boolean xor connector

Instance Attribute Summary

Attributes inherited from Vanguard::Matcher::Binary

#left, #right

Instance Method Summary collapse

Instance Method Details

#matches?(value) ⇒ true, false

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.

Test if value matches left xor right

Returns:

  • (true)
  • (false)


15
16
17
# File 'lib/vanguard/matcher/binary/xor.rb', line 15

def matches?(value)
  left_matches?(value) ^ right_matches?(value)
end