Module: ZhongwenTools::URI
- Defined in:
- lib/zhongwen_tools/uri.rb
Class Method Summary collapse
Class Method Details
.encode(str) ⇒ Object
6 7 8 |
# File 'lib/zhongwen_tools/uri.rb', line 6 def self.encode(str) ::URI.encode str end |
.escape(str) ⇒ Object
10 11 12 |
# File 'lib/zhongwen_tools/uri.rb', line 10 def self.escape(str) ::URI.escape(str, Regexp.new("[^#{ ::URI::PATTERN::UNRESERVED }]")) end |