Class: Boolean
- Inherits:
-
Object
- Object
- Boolean
- Defined in:
- opal/opal/corelib/boolean.rb
Instance Method Summary collapse
- #&(other) ⇒ Object
- #==(other) ⇒ Object (also: #equal?)
- #^(other) ⇒ Object
- #to_s ⇒ Object
- #|(other) ⇒ Object
Instance Method Details
#&(other) ⇒ Object
8 9 10 |
# File 'opal/opal/corelib/boolean.rb', line 8 def &(other) `(self == true) ? (other !== false && other !== nil) : false` end |
#==(other) ⇒ Object Also known as: equal?
20 21 22 |
# File 'opal/opal/corelib/boolean.rb', line 20 def ==(other) `(self == true) === other.valueOf()` end |
#^(other) ⇒ Object
16 17 18 |
# File 'opal/opal/corelib/boolean.rb', line 16 def ^(other) `(self == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end |
#to_s ⇒ Object
28 29 30 |
# File 'opal/opal/corelib/boolean.rb', line 28 def to_s `(self == true) ? 'true' : 'false'` end |
#|(other) ⇒ Object
12 13 14 |
# File 'opal/opal/corelib/boolean.rb', line 12 def |(other) `(self == true) ? true : (other !== false && other !== nil)` end |