In Files

  • rubygems/uri.rb

Class/Module Index [+]

Quicksearch

Gem::Uri

The Uri handles rubygems source URIs.

Attributes

parsed_uri[R]

Add a protected reader for the cloned instance to access the original object's parsed uri

Public Class Methods

new(source_uri) click to toggle source
 
               # File rubygems/uri.rb, line 8
def initialize(source_uri)
  @parsed_uri = parse(source_uri)
end
            

Public Instance Methods

method_missing(method_name, *args, &blk) click to toggle source
 
               # File rubygems/uri.rb, line 34
def method_missing(method_name, *args, &blk)
  if @parsed_uri.respond_to?(method_name)
    @parsed_uri.send(method_name, *args, &blk)
  else
    super
  end
end
            
redact_credentials_from(text) click to toggle source
 
               # File rubygems/uri.rb, line 28
def redact_credentials_from(text)
  return text unless valid_uri? && password?

  text.sub(password, 'REDACTED')
end
            
redacted() click to toggle source
 
               # File rubygems/uri.rb, line 12
def redacted
  return self unless valid_uri?

  if token? || oauth_basic?
    with_redacted_user
  elsif password?
    with_redacted_password
  else
    self
  end
end
            
respond_to_missing?(method_name, include_private = false) click to toggle source
 
               # File rubygems/uri.rb, line 42
def respond_to_missing?(method_name, include_private = false)
  @parsed_uri.respond_to?(method_name, include_private) || super
end
            
to_s() click to toggle source
 
               # File rubygems/uri.rb, line 24
def to_s
  @parsed_uri.to_s
end