Class: String
- Defined in:
- lib/sailpoint/core_ext/blank.rb,
lib/sailpoint/core_ext/escape_str.rb
Overview
Used to override and give String the blank? validation similar to Rails
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Used to determine if the object is nil or empty (”).
-
#escape_str ⇒ String
Escape any special characters to make them URL safe.
Instance Method Details
#blank? ⇒ Boolean
Used to determine if the object is nil or empty (”)
18 19 20 |
# File 'lib/sailpoint/core_ext/blank.rb', line 18 def blank? strip&.empty? || strip&.length&.zero? end |
#escape_str ⇒ String
Escape any special characters to make them URL safe
16 17 18 |
# File 'lib/sailpoint/core_ext/escape_str.rb', line 16 def escape_str CGI.escape(strip) end |