Method: Wgit::Url#to_query

Defined in:
lib/wgit/url.rb

#to_queryWgit::Url? Also known as: query

Returns a new Wgit::Url containing just the query string of this URL e.g. Given http://google.com?q=foo&bar=1, 'q=ruby&bar=1' is returned.

Returns:

  • (Wgit::Url, nil)

    Containing just the query string or nil.



511
512
513
514
# File 'lib/wgit/url.rb', line 511

def to_query
  query = @uri.query
  query ? Wgit::Url.new(query) : nil
end