add new method "Object.present?" as a counter to #empty?
Basically Object#present? , "An object is present if it’s not #empty?" 
or, in other words, "is there any data inside?"
=> false # because it's #empty?
button.text=text if text.present? # I only care whether the text actually was set to something, and also don't want to worry about whether it's nil or not.
Basic implementation ():
!(respond_to?(:empty?) ? empty? : !self)
 http://api.rubyonrails.org/classes/Object.html#method-i-present-3F they also use #blank but that's for a different feature request.
#3 [ruby-core:46725] Updated by mame (Yusuke Endoh) almost 5 years ago
- Status changed from Open to Rejected
Sorry but this proposal was rejected at the developer meeting (7/21).
There are many possible definitions of "present?" depending upon
contexts. It's not Ruby's decision. People should decide the
definition for their context.
Yusuke Endoh email@example.com