Class: TWProxy
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- TWProxy
- Defined in:
- lib/twproxy/proxy.rb
Instance Method Summary collapse
-
#get_uri ⇒ Object
Wiki proxy.
Instance Method Details
#get_uri ⇒ Object
Wiki proxy
72 73 74 75 76 77 78 79 80 |
# File 'lib/twproxy/proxy.rb', line 72 def get_uri capture = URI::decode(params[:captures][0]) base = settings.url if settings.url[-1] != '/' base += '/' end uri = URI.parse("#{base}#{URI::encode(capture)}") end |