Class: Almodovar::AuthContext

Inherits:
Object
  • Object
show all
Defined in:
lib/almodovar/http_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password, domain) ⇒ AuthContext

Returns a new instance of AuthContext.



105
106
107
108
109
# File 'lib/almodovar/http_client.rb', line 105

def initialize(username, password, domain)
  @username = username
  @password = password
  @domain = domain
end

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



103
104
105
# File 'lib/almodovar/http_client.rb', line 103

def domain
  @domain
end

#passwordObject

Returns the value of attribute password.



103
104
105
# File 'lib/almodovar/http_client.rb', line 103

def password
  @password
end

#usernameObject

Returns the value of attribute username.



103
104
105
# File 'lib/almodovar/http_client.rb', line 103

def username
  @username
end

Instance Method Details

#differs_from?(other) ⇒ Boolean

Returns:

  • (Boolean)


111
112
113
114
# File 'lib/almodovar/http_client.rb', line 111

def differs_from?(other)
  return true if other.nil?
  (username != other.username) || (password != other.password) || (domain != other.domain)
end