Class: Baykit::BayServer::Util::URLEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/baykit/bayserver/util/url_encoder.rb

Class Method Summary collapse

Class Method Details

.encode_tilde(url) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/baykit/bayserver/util/url_encoder.rb', line 5

def URLEncoder.encode_tilde(url)
  buf = ""
  url.each_char do |c|
    if(c == "~")
      buf.concat("%7E")
    else
      buf.concat(c)
    end
  end
  return buf
end