Class: NilClass
- Inherits:
-
Object
- Object
- NilClass
- Defined in:
- opal/opal/corelib/nil_class.rb
Instance Method Summary collapse
- #! ⇒ Object
- #&(other) ⇒ Object
- #==(other) ⇒ Object
- #^(other) ⇒ Object
- #dup ⇒ Object
- #inspect ⇒ Object
- #nil? ⇒ Boolean
- #singleton_class ⇒ Object
- #to_a ⇒ Object
- #to_h ⇒ Object
- #to_i ⇒ Object (also: #to_f)
- #to_s ⇒ Object
- #|(other) ⇒ Object
Instance Method Details
#! ⇒ Object
2 3 4 |
# File 'opal/opal/corelib/nil_class.rb', line 2 def ! true end |
#&(other) ⇒ Object
6 7 8 |
# File 'opal/opal/corelib/nil_class.rb', line 6 def &(other) false end |
#==(other) ⇒ Object
18 19 20 |
# File 'opal/opal/corelib/nil_class.rb', line 18 def ==(other) `other === nil` end |
#^(other) ⇒ Object
14 15 16 |
# File 'opal/opal/corelib/nil_class.rb', line 14 def ^(other) `other !== false && other !== nil` end |
#inspect ⇒ Object
26 27 28 |
# File 'opal/opal/corelib/nil_class.rb', line 26 def inspect 'nil' end |
#singleton_class ⇒ Object
34 35 36 |
# File 'opal/opal/corelib/nil_class.rb', line 34 def singleton_class NilClass end |
#to_a ⇒ Object
38 39 40 |
# File 'opal/opal/corelib/nil_class.rb', line 38 def to_a [] end |
#to_h ⇒ Object
42 43 44 |
# File 'opal/opal/corelib/nil_class.rb', line 42 def to_h `Opal.hash()` end |
#to_i ⇒ Object Also known as: to_f
46 47 48 |
# File 'opal/opal/corelib/nil_class.rb', line 46 def to_i 0 end |
#to_s ⇒ Object
52 53 54 |
# File 'opal/opal/corelib/nil_class.rb', line 52 def to_s '' end |
#|(other) ⇒ Object
10 11 12 |
# File 'opal/opal/corelib/nil_class.rb', line 10 def |(other) `other !== false && other !== nil` end |