Class: String

Inherits:
Object show all
Defined in:
lib/angry_mob/extend/blank.rb,
lib/angry_mob/extend/string.rb

Overview

class FalseClass

Instance Method Summary collapse

Instance Method Details

#blank?TrueClass, FalseClass

Strips out whitespace then tests if the string is empty.

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

Returns:



102
103
104
# File 'lib/angry_mob/extend/blank.rb', line 102

def blank?
  strip.empty?
end

#pathnameObject Also known as: p



4
5
6
# File 'lib/angry_mob/extend/string.rb', line 4

def pathname
  Pathname(self)
end

#present?Boolean

Returns:

  • (Boolean)


105
106
107
# File 'lib/angry_mob/extend/blank.rb', line 105

def present?
  ! blank?
end