lib/frozen-filters.rb
# Returns the path of an url. e.g. `/first/second/index.html`.
Returns the path of an url.
Returns the path of an url .
def extract_path(input)
    input_s = input.to_s
    if /^(\w+):/.match(input_s)
      input_s.gsub(/^\w+:[^\/]*\/\/[^\/]+(\/[^\?]+)(?:\?.*)?$/, '\1')
    else
      input_s.gsub(/(?:\?.*)$/, '')
    end
  end
def extract_path ( input ) input_s = input . to_s if / ^( \w +): / . match ( input_s ) input_s . gsub ( / ^ \w +:[^ \/ ]* \/ \/ [^ \/ ]+( \/ [^ \? ]+)(?: \? .*)?$ / , '\1' ) else input_s . gsub ( / (?: \? .*)$ / , '' ) end end
Returns the path of an url.
Returns the path of an url .
input
<not_specific>