Class: String

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

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/core_extensions/string.rb', line 2

def blank?
  self !~ /\S/
end

#quoteObject

todo: add ability to escape quotes inside the string



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

def quote
  "'#{ self }'"
end