Module: Enumerable

Defined in:
lib/babushka/core_patches/blank.rb

Overview

#blank? means (nil? or empty?). Instead of defining it on all objects and checking if they respond to the #empty? method when #blank? is called, we define it only on the classes where it has meaning. That means we also have to define it on nil, since it is also considered 'blank'.

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)

7
8
9
# File 'lib/babushka/core_patches/blank.rb', line 7

def blank?
  empty?
end