File: auth_realm.rb

package info (click to toggle)
ruby-mechanize 2.7.6-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,480 kB
  • sloc: ruby: 11,380; makefile: 5; sh: 4
file content (31 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Mechanize::HTTP::AuthRealm

  attr_reader :scheme
  attr_reader :uri
  attr_reader :realm

  def initialize scheme, uri, realm
    @scheme = scheme
    @uri    = uri
    @realm  = realm if realm
  end

  def == other
    self.class === other and
      @scheme == other.scheme and
      @uri    == other.uri    and
      @realm  == other.realm
  end

  alias eql? ==

  def hash # :nodoc:
    [@scheme, @uri, @realm].hash
  end

  def inspect # :nodoc:
    "#<AuthRealm %s %p \"%s\">" % [@scheme, @uri, @realm]
  end

end