Sha256: 0b163f6d830429da182e32e401e675ac8968a58699e24e70204f34e271516b0b

Contents?: true

Size: 406 Bytes

Versions: 58

Compression:

Stored size: 406 Bytes

Contents

class LimitedURI
  extend Forwardable

  def_delegators :@uri, :scheme, :host, :port, :port=, :path, :query, :query=, :to_s

  def initialize(uri)
    @uri = uri
  end

  def ==(other)
    to_s == other.to_s
  end

  def self.parse(uri)
    return uri if uri.is_a? LimitedURI
    return new(uri) if uri.is_a? URI
    return new(URI.parse(uri)) if uri.is_a? String

    raise URI::InvalidURIError
  end
end

Version data entries

58 entries across 58 versions & 7 rubygems

Version Path
cloudsmith-api-1.42.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-1.33.7 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-1.30.0 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.57.1 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.54.15 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.53.79 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.53.17 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb