Method: Wgit::Url#omit

Defined in:
lib/wgit/url.rb

#omit(*components) ⇒ Wgit::Url

Omits the given URL components from self and returns a new Wgit::Url.

Calls Addressable::URI#omit underneath and creates a new Wgit::Url from the output. See the Addressable::URI docs for more information.

Parameters:

  • components (*Symbol)

    One or more Symbols representing the URL components to omit. The following components are supported: :scheme, :user, :password, :userinfo, :host, :port, :authority, :path, :query, :fragment.

Returns:

  • (Wgit::Url)

    Self's URL value with the given components omitted.



583
584
585
586
# File 'lib/wgit/url.rb', line 583

def omit(*components)
  omitted = @uri.omit(*components)
  Wgit::Url.new(omitted.to_s)
end