Method: URI.get_query_string
- Defined in:
- lib/standard/facets/uri.rb
.get_query_string(uri) ⇒ Object
This method returns the query string of a uri
Input: the uri
Output: the query string. returns nil if no query string
120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/standard/facets/uri.rb', line 120 def get_query_string(uri) return nil unless uri # gmosx: INVESTIGATE ruby's URI seems to differently handle # abs and rel uris. if md = URI::REGEXP::ABS_URI.match(uri) return md[8] elsif md = URI::REGEXP::REL_URI.match(uri) return md[7] end return nil end |