Class: NRSER::Types::XOR
- Inherits:
-
Combinator
- Object
- Type
- Combinator
- NRSER::Types::XOR
- Defined in:
- lib/nrser/types/combinators.rb
Constant Summary collapse
- JOIN_SYMBOL =
' ⊕ '
Instance Attribute Summary
Attributes inherited from Combinator
Instance Method Summary collapse
Methods inherited from Combinator
#==, #custom_from_s, #explain, #from_data, #has_from_data?, #has_from_s?, #has_to_data?, #initialize, #to_data
Methods inherited from Type
#===, #builtin_inspect, #check, #check!, #explain, #from_data, #from_s, #has_from_data?, #has_from_s?, #has_to_data?, #initialize, #inspect, #intersection, #name, #not, #respond_to?, #test, #to_data, #to_s, #union, #xor
Constructor Details
This class inherits a constructor from NRSER::Types::Combinator
Instance Method Details
#test?(value) ⇒ Boolean
215 216 217 |
# File 'lib/nrser/types/combinators.rb', line 215 def test? value @types.count { |type| type === value } == 1 end |