Methods
Public Instance methods
<=>( other )

Any comparison against nil with return -1, except for nil itself which returns 0.

# File lib/facets/core/nilclass/op_cmp.rb, line 7
  def <=>( other )
    other.nil? 0 : -1
  end
[](*args)

Allows nil to respond to #[]. Always returns nil.

 nil[]   #=> nil
# File lib/facets/core/nilclass/op_fetch.rb, line 9
  def [](*args)
    nil
  end
blank?()

Allows nil to respond to blank? method. Alwasy returns true.

 nil.blank?   #=> true
# File lib/facets/core/nilclass/blank.rb, line 9
  def blank? ; true ; end
empty?()

Allows nil to respond to empty? method. Alwasy returns true.

 nil.empty?   #=> true
# File lib/facets/core/nilclass/empty.rb, line 9
  def empty? ; true ; end
include?(*args)

Allows nil to respond to include? method. Alwasy returns nil.

 nil.include?("abc")   #=> nil
# File lib/facets/core/nilclass/include.rb, line 9
  def include?(*args); nil; end
length()

Allows nil to respond to length. Always returns 0.

 nil.length   #=> 0
# File lib/facets/core/nilclass/size.rb, line 16
  def length; 0; end
size()

Allows nil to respond to size. Always returns 0.

 nil.size   #=> 0
# File lib/facets/core/nilclass/size.rb, line 9
  def size; 0; end
succ()
# File lib/facets/core/nilclass/succ.rb, line 3
  def succ; nil; end
to_bool()
# File lib/facets/core/kernel/to_bool.rb, line 21
  def to_bool
    false
  end
to_h()

Allows nil to create an empty hash, similar to to_a and to_s.

 nil.to_h    #=> {}
# File lib/facets/core/nilclass/to_h.rb, line 9
  def to_h; {}; end