Class: Mechanize::HTTP::AuthRealm
- Inherits:
-
Object
- Object
- Mechanize::HTTP::AuthRealm
- Defined in:
- lib/mechanize/http/auth_realm.rb
Instance Attribute Summary collapse
-
#realm ⇒ Object
readonly
Returns the value of attribute realm.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#hash ⇒ Object
:nodoc:.
-
#initialize(scheme, uri, realm) ⇒ AuthRealm
constructor
A new instance of AuthRealm.
-
#inspect ⇒ Object
:nodoc:.
Constructor Details
#initialize(scheme, uri, realm) ⇒ AuthRealm
Returns a new instance of AuthRealm.
7 8 9 10 11 |
# File 'lib/mechanize/http/auth_realm.rb', line 7 def initialize scheme, uri, realm @scheme = scheme @uri = uri @realm = realm.downcase if realm end |
Instance Attribute Details
#realm ⇒ Object (readonly)
Returns the value of attribute realm.
5 6 7 |
# File 'lib/mechanize/http/auth_realm.rb', line 5 def realm @realm end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
3 4 5 |
# File 'lib/mechanize/http/auth_realm.rb', line 3 def scheme @scheme end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
4 5 6 |
# File 'lib/mechanize/http/auth_realm.rb', line 4 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
13 14 15 16 17 18 |
# File 'lib/mechanize/http/auth_realm.rb', line 13 def == other self.class === other and @scheme == other.scheme and @uri == other.uri and @realm == other.realm end |
#hash ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/mechanize/http/auth_realm.rb', line 22 def hash # :nodoc: [@scheme, @uri, @realm].hash end |
#inspect ⇒ Object
:nodoc:
26 27 28 |
# File 'lib/mechanize/http/auth_realm.rb', line 26 def inspect # :nodoc: "#<AuthRealm %s %p \"%s\">" % [@scheme, @uri, @realm] end |