Class: Object::String

Inherits:
Object show all
Defined in:
lib/lobbyliste/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/lobbyliste/core_ext/string.rb', line 11

def blank?
   empty? || /\A[[:space:]]*\z/ === self
end

#squishObject



7
8
9
# File 'lib/lobbyliste/core_ext/string.rb', line 7

def squish
  self.dup.gsub(/[[:space:]]+/, ' ').strip
end