Adds NilClass#null? #=> true and Object#null? #=> false
Useful for implementing custom null objects that will also return true for #null?
Add to your Gemfile:
gem 'null_question'class NullObject
def null?
true
end
end
nil.null? #=> true
NullObject.new.null? #=> true
Object.new.null? #=> falseCopyright (C) 2015 Jan Lelis https://janlelis.com. Released under the MIT license.