Class: URI::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/mako/core_ext/uri.rb

Instance Method Summary collapse

Instance Method Details

#absolutize!(base_uri) ⇒ Object

Compares parsed URI with a base URI and adds the host section, if needed

Parameters:

  • base_uri (URI)


8
9
10
# File 'lib/mako/core_ext/uri.rb', line 8

def absolutize!(base_uri)
  base_uri.host == host ? to_s : base_uri.merge(self).to_s
end