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