Class: Bundler::AnonymizableURI

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/anonymizable_uri.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_uri) ⇒ AnonymizableURI

Returns a new instance of AnonymizableURI.


6
7
8
9
10
11
12
13
14
# File 'lib/bundler/anonymizable_uri.rb', line 6

def initialize(original_uri)
  @original_uri = original_uri.freeze
  @without_credentials ||=
    if original_uri.userinfo
      original_uri.dup.tap { |uri| uri.user = uri.password = nil }.freeze
    else
      original_uri
    end
end

Instance Attribute Details

#original_uriObject (readonly)

Returns the value of attribute original_uri


3
4
5
# File 'lib/bundler/anonymizable_uri.rb', line 3

def original_uri
  @original_uri
end

#without_credentialsObject (readonly)

Returns the value of attribute without_credentials


3
4
5
# File 'lib/bundler/anonymizable_uri.rb', line 3

def without_credentials
  @without_credentials
end