Class: RestMan::Request::Init::Url::NormalizeUrl
- Inherits:
-
ActiveMethod::Base
- Object
- ActiveMethod::Base
- RestMan::Request::Init::Url::NormalizeUrl
- Defined in:
- lib/restman/request/init/url/normalize_url.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
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 |