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.
8 9 10 11 12 |
# File 'lib/mechanize/http/auth_realm.rb', line 8 def initialize scheme, uri, realm @scheme = scheme @uri = uri @realm = realm if realm end |
Instance Attribute Details
#realm ⇒ Object (readonly)
Returns the value of attribute realm.
6 7 8 |
# File 'lib/mechanize/http/auth_realm.rb', line 6 def realm @realm end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
4 5 6 |
# File 'lib/mechanize/http/auth_realm.rb', line 4 def scheme @scheme end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/mechanize/http/auth_realm.rb', line 5 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
14 15 16 17 18 19 |
# File 'lib/mechanize/http/auth_realm.rb', line 14 def == other self.class === other and @scheme == other.scheme and @uri == other.uri and @realm == other.realm end |
#hash ⇒ Object
:nodoc:
23 24 25 |
# File 'lib/mechanize/http/auth_realm.rb', line 23 def hash # :nodoc: [@scheme, @uri, @realm].hash end |
#inspect ⇒ Object
:nodoc:
27 28 29 |
# File 'lib/mechanize/http/auth_realm.rb', line 27 def inspect # :nodoc: "#<AuthRealm %s %p \"%s\">" % [@scheme, @uri, @realm] end |