Sha256: 79d625877cb9dba86b6349dc7ee90964173a5948115d324dd5ed49bd34c1967d

Contents?: true

Size: 1.08 KB

Versions: 18

Compression:

Stored size: 1.08 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
    ].freeze

    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

18 entries across 18 versions & 1 rubygems

Version Path
isomorfeus-data-2.0.7 opal/uri/generic.rb
isomorfeus-data-2.0.6 opal/uri/generic.rb
isomorfeus-data-2.0.5 opal/uri/generic.rb
isomorfeus-data-2.0.4 opal/uri/generic.rb
isomorfeus-data-2.0.3 opal/uri/generic.rb
isomorfeus-data-2.0.2 opal/uri/generic.rb
isomorfeus-data-2.0.1 opal/uri/generic.rb
isomorfeus-data-2.0.0 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc10 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc9 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc8 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc7 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc6 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc5 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc4 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc3 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc2 opal/uri/generic.rb
isomorfeus-data-2.0.0.rc1 opal/uri/generic.rb