Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rubocop/core_ext/string.rb
Overview
Extensions to the core String class
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Checks whether a string is blank.
Instance Method Details
#blank? ⇒ Boolean
Checks whether a string is blank. A string is considered blank if it is either empty or contains only whitespace characters.
15 16 17 |
# File 'lib/rubocop/core_ext/string.rb', line 15 def blank? empty? || lstrip.empty? end |