Class: RestMan::Request::Init::Url::NormalizeUrl

Inherits:
ActiveMethod::Base
  • Object
show all
Defined in:
lib/restman/request/init/url/normalize_url.rb

Instance Method Summary collapse

Instance Method Details

#callObject



8
9
10
11
12
13
14
# File 'lib/restman/request/init/url/normalize_url.rb', line 8

def call
  if url.match(%r{\A[a-z][a-z0-9+.-]*://}i)
    url
  else
    "http://#{url}"
  end
end