Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rtasklib/helpers.rb

Overview

Monkey patching String, instead of importing ActiveSupport, bc its overkill for what we were using it for

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) blank?

Returns true for blank Strings

Examples:

"".blank? #=> true
"  ".blank? #=> true
".".blank? #=> false

Returns:

  • (Boolean)


20
21
22
# File 'lib/rtasklib/helpers.rb', line 20

def blank?
  self.strip.empty?
end