Module: OnsOpenApi::UrlHelper
- Included in:
- DataHelper
- Defined in:
- lib/ons_openapi/url_helper.rb
Instance Method Summary collapse
Instance Method Details
#url ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/ons_openapi/url_helper.rb', line 3 def url require 'cgi' if respond_to?(:urls) && urls uri = URI.parse urls.urls.detect{|x| x.representation['json'] }.href params = Rack::Utils.parse_query(uri.query) params.delete('apikey') return [uri.path, params] end end |