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