Sha256: 7f72ff50043ad9621fa0b4e68a7dea8bca1decf6133b1bd3a3442d6dadfa5d64

Contents?: true

Size: 1.07 KB

Versions: 78

Compression:

Stored size: 1.07 KB

Contents

module URI
  class Generic
    attr_reader :scheme, :userinfo, :user, :password, :host, :port, :path,
      :query, :fragment, :opaque, :registry

    #
    # An Array of the available components for URI::Generic
    #
    COMPONENT = [
      :scheme,
      :userinfo, :host, :port, :registry,
      :path, :opaque,
      :query,
      :fragment
    ]

    def initialize(scheme,
                   userinfo, host, port, registry,
                   path, opaque,
                   query,
                   fragment,
                   parser = nil,
                   arg_check = false)
      @scheme = scheme
      @userinfo = userinfo
      @host = host
      @port = port
      @path = path
      @query = query
      @fragment = fragment
      @user, @password = userinfo.split(/:/) if userinfo
    end

    def ==(other)
      self.class == other.class &&
        component_ary == other.component_ary
    end

    protected

    def component_ary
      self.class::COMPONENT.collect do |x|
        self.send(x)
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 2 rubygems

Version Path
isomorfeus-preact-23.9.0.rc12 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc11 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc10 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc9 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc8 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc7 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc6 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc5 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc4 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc3 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc2 opal/uri/generic.rb
isomorfeus-preact-23.9.0.rc1 opal/uri/generic.rb
isomorfeus-preact-23.8.0.rc3 opal/uri/generic.rb
isomorfeus-preact-23.8.0.rc2 opal/uri/generic.rb
isomorfeus-preact-23.8.0.rc1 opal/uri/generic.rb
isomorfeus-preact-23.7.0.rc5 opal/uri/generic.rb
isomorfeus-preact-23.7.0.rc4 opal/uri/generic.rb
isomorfeus-preact-23.7.0.rc3 opal/uri/generic.rb
isomorfeus-preact-23.7.0.rc2 opal/uri/generic.rb
isomorfeus-preact-23.7.0.rc1 opal/uri/generic.rb