Method: FakeWeb::Utility.uri_escape

Defined in:
lib/fake_web/utility.rb

.uri_escape(*args) ⇒ Object

Wrapper for URI escaping that switches between URI::Parser#escape and URI.escape for 1.9-compatibility



40
41
42
43
44
45
46
# File 'lib/fake_web/utility.rb', line 40

def self.uri_escape(*args)
  if URI.const_defined?(:Parser)
    URI::Parser.new.escape(*args)
  else
    URI.escape(*args)
  end
end