Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/sailpoint/helpers.rb
Overview
Used to override and give String the blank? validation similar to Rails
Instance Method Summary collapse
-
#blank? ⇒ true, false
Used to determine if the object is nil or empty (”).
- #escape_str ⇒ Object
-
#present? ⇒ true, false
Used to determine if the object is not nil.
Instance Method Details
#blank? ⇒ true, false
Used to determine if the object is nil or empty (”)
5 6 7 |
# File 'lib/sailpoint/helpers.rb', line 5 def blank? self.nil? || self.strip.empty? || self.strip.length.zero? end |
#escape_str ⇒ Object
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
11 12 13 |
# File 'lib/sailpoint/helpers.rb', line 11 def present? !self.nil? end |