Class: String

Inherits:
Object show all
Defined in:
lib/core_extensions.rb

Overview

class FalseClass

Instance Method Summary collapse

Instance Method Details

#blank?TrueClass, FalseClass

Strips out whitespace then tests if the string is empty.

Examples:

“”.blank? #=> true

“ ”.blank? #=> true

“ hey ho ”.blank? #=> false

Returns:



77
78
79
# File 'lib/core_extensions.rb', line 77

def blank?
  strip.empty?
end