Module: ERB::Util
- Includes:
- Escape
- Defined in:
- lib/erb/util.rb
Overview
– ERB::Util
A utility module for conversion routines, often handy in HTML generation.
Class Method Summary collapse
- .h ⇒ Object
- .html_escape ⇒ Object
-
.u ⇒ Object
A utility method for encoding the String s as a URL.
-
.url_encode(s) ⇒ Object
A utility method for encoding the String s as a URL.
Class Method Details
.h ⇒ Object
|
|
# File 'lib/erb/util.rb', line 41
|
.html_escape ⇒ Object
.u ⇒ Object
59 60 61 |
# File 'lib/erb/util.rb', line 59 def url_encode(s) CGI.escapeURIComponent(s.to_s) end |
.url_encode(s) ⇒ Object
56 57 58 |
# File 'lib/erb/util.rb', line 56 def url_encode(s) CGI.escapeURIComponent(s.to_s) end |