Class: String

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

Overview

Monkeypatch string with some useful methods

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns - true if self is empty or filled with spaces only.

Returns:

  • (Boolean)
    • true if self is empty or filled with spaces only



5
6
7
# File 'lib/core_extensions/string.rb', line 5

def blank?
  self.strip == ''
end