blank? defined not only in String, but also in the Nil part, because it is a double test. It checks if the variable is a nil? variable nil? or empty? /space.
You cannot specify a string if it is zero, because it does not have a nil? method nil? but can you ask nil? if he is nil? .
Active support has access to the main extensions that allow us to choose the necessary functionality and include the necessary methods. For blank? You can:
require 'active_support/core_ext/object/blank'
See blank? more details blank? and read the entire document to find out what else is available. Using Active Support, this method eliminates the need to download all ASs, but at the same time get useful features.
the tin man
source share