Module: Conjur::Escape
- Included in:
- API
- Defined in:
- lib/conjur/escape.rb
Overview
Provides helpers for escaping url components.
The helpers are added as both class and isntance methods.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#fully_escape(str) ⇒ String
URL escape the entire string.
-
#path_escape(str) ⇒ String
Escape a URI path component.
-
#query_escape(str) ⇒ String
Escape a URI query value.
Instance Method Details
#fully_escape(str) ⇒ String
URL escape the entire string. This is essentially the same as calling CGI.escape str
.
103 104 105 |
# File 'lib/conjur/escape.rb', line 103 def fully_escape(str) self.class.fully_escape str end |
#path_escape(str) ⇒ String
Escape a URI path component.
This method simply calls Conjur::Escape::ClassMethods#path_or_query_escape.
114 115 116 |
# File 'lib/conjur/escape.rb', line 114 def path_escape(str) self.class.path_escape str end |
#query_escape(str) ⇒ String
Escape a URI query value.
This method simply calls Conjur::Escape::ClassMethods#path_or_query_escape.
126 127 128 |
# File 'lib/conjur/escape.rb', line 126 def query_escape(str) self.class.query_escape str end |