Module: Faraday::Utils

Defined in:
lib/reso_transport.rb

Instance Method Summary collapse

Instance Method Details

#escape(str) ⇒ Object



27
28
29
30
31
32
# File 'lib/reso_transport.rb', line 27

def escape(str)
  str.to_s.gsub(ESCAPE_RE) do |match|
    '%' + match.unpack('H2' * match.bytesize).join('%').upcase
  end.gsub(" ","%20")

end