method

blank?

v2.2.1 - Show latest stable - Class: Object
blank?()
public

An object is blank if it’s false, empty, or a whitespace string. For example, "", " ", nil, [], and {} are blank.

This simplifies

  if !address.nil? && !address.empty?

to

  if !address.blank?

1Note

#present?

jerrett ยท Oct 27, 20094 thanks

The opposite of this is #present?