NullClass is essentially NilClass but it differs in one important way. When a method is called against it that it deoesn’t have, it will simply return null value rather then raise an error.
TODO: Perhaps NullClass and NackClass should be one and the same?
# File lib/more/facets/nullclass.rb, line 43 43: def [](key); nil; end
# File lib/more/facets/nullclass.rb, line 40 40: def inspect ; 'null' ; end
# File lib/more/facets/nullclass.rb, line 44 44: def method_missing(sym, *args) 45: return nil if sym.to_s[1,1] == '?' 46: self 47: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.