examples/logic_checker.rb in rast-0.15.1 vs examples/logic_checker.rb in rast-0.18.0

- old
+ new

@@ -18,6 +18,14 @@ # @param argument1 first argument of Boolean type. # @param argument2 second argument of Boolean type. def or(argument1, argument2) argument1 || argument2 end + + # Perform logical XOR operation on two arguments. + # + # @param argument1 first argument of Boolean type. + # @param argument2 second argument of Boolean type. + def xor(argument1, argument2) + argument1 && !argument2 || !argument1 && argument2 + end end