Class: NilClass
- Inherits:
-
Object
- Object
- NilClass
- Defined in:
- opal/opal/corelib/nil_class.rb
Instance Method Summary collapse
- #&(other) ⇒ Object
- #==(other) ⇒ Object
- #^(other) ⇒ Object
- #dup ⇒ Object
- #inspect ⇒ Object
- #nil? ⇒ Boolean
- #object_id ⇒ Object (also: #hash)
- #singleton_class ⇒ Object
- #to_a ⇒ Object
- #to_h ⇒ Object
- #to_i ⇒ Object (also: #to_f)
- #to_s ⇒ Object
- #|(other) ⇒ Object
Instance Method Details
#&(other) ⇒ Object
2 3 4 |
# File 'opal/opal/corelib/nil_class.rb', line 2 def &(other) false end |
#==(other) ⇒ Object
14 15 16 |
# File 'opal/opal/corelib/nil_class.rb', line 14 def ==(other) `other === nil` end |
#^(other) ⇒ Object
10 11 12 |
# File 'opal/opal/corelib/nil_class.rb', line 10 def ^(other) `other !== false && other !== nil` end |
#inspect ⇒ Object
22 23 24 |
# File 'opal/opal/corelib/nil_class.rb', line 22 def inspect 'nil' end |
#object_id ⇒ Object Also known as: hash
52 53 54 |
# File 'opal/opal/corelib/nil_class.rb', line 52 def object_id `#{NilClass}._id || (#{NilClass}._id = $opal.uid())` end |
#singleton_class ⇒ Object
30 31 32 |
# File 'opal/opal/corelib/nil_class.rb', line 30 def singleton_class NilClass end |
#to_a ⇒ Object
34 35 36 |
# File 'opal/opal/corelib/nil_class.rb', line 34 def to_a [] end |
#to_h ⇒ Object
38 39 40 |
# File 'opal/opal/corelib/nil_class.rb', line 38 def to_h `$opal.hash()` end |
#to_i ⇒ Object Also known as: to_f
42 43 44 |
# File 'opal/opal/corelib/nil_class.rb', line 42 def to_i 0 end |
#to_s ⇒ Object
48 49 50 |
# File 'opal/opal/corelib/nil_class.rb', line 48 def to_s '' end |
#|(other) ⇒ Object
6 7 8 |
# File 'opal/opal/corelib/nil_class.rb', line 6 def |(other) `other !== false && other !== nil` end |