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-2.0.16 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.15 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.14 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.13 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.12 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.11 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.10 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.9 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.8 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.7 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.6 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.5 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.4 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.2 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.1 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-2.0.0 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-1.142.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-1.120.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb
cloudsmith-api-1.61.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/limited_uri.rb