Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/sailpoint/helpers.rb

Overview

Used to override and give String the blank? validation similar to Rails

Instance Method Summary collapse

Instance Method Details

#blank?true, false

Used to determine if the object is nil or empty (”)

Returns:

  • (true, false)


5
6
7
# File 'lib/sailpoint/helpers.rb', line 5

def blank?
  self.nil? || self.strip.empty? || self.strip.length.zero?
end

#escape_strObject



15
16
17
# File 'lib/sailpoint/helpers.rb', line 15

def escape_str
  CGI.escape(self)
end

#present?true, false

Used to determine if the object is not nil

Returns:

  • (true, false)


11
12
13
# File 'lib/sailpoint/helpers.rb', line 11

def present?
  !self.nil?
end