Bool has only two possible values: true and false. They are constructed using these literals:
true # A Bool that is true
false # A Bool that is false
Negates this boolean.
Bitwise AND.
Exclusive Or.
Returns a hash value for this boolean: 0 for false, 1 for true.
Returns "true" for true and "false" for false.
Appends "true" for true and "false" for false to the given IO.
Bitwise OR.
Negates this boolean.
!true #=> false
!false #=> trueBitwise AND. Returns true if this bool and other are true, otherwise returns false.
false & false #=> false
false & true #=> false
true & false #=> false
true & true #=> trueExclusive Or. Returns true if this bool is different from other, otherwise returns false.
false ^ false #=> false
false ^ true #=> true
true ^ false #=> true
true ^ true #=> falseReturns a hash value for this boolean: 0 for false, 1 for true.
Returns "true" for true and "false" for false.
Appends "true" for true and "false" for false to the given IO.
Bitwise OR. Returns true if this bool or other is true, otherwise returns false.
false | false #=> false
false | true #=> true
true | false #=> true
true | true #=> true