Class: DbUrlHelper::Credentials::Credential
- Inherits:
-
Object
- Object
- DbUrlHelper::Credentials::Credential
- Defined in:
- lib/db_url_helper/credentials/credential.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#user ⇒ Object
Returns the value of attribute user.
-
#weight ⇒ Object
Returns the value of attribute weight.
Instance Method Summary collapse
- #<=>(right) ⇒ Object
-
#initialize(user = "", password = "", weight = -1,, provider = nil) ⇒ Credential
constructor
A new instance of Credential.
Constructor Details
#initialize(user = "", password = "", weight = -1,, provider = nil) ⇒ Credential
Returns a new instance of Credential.
5 6 7 8 9 10 |
# File 'lib/db_url_helper/credentials/credential.rb', line 5 def initialize user="",password="",weight=-1,provider=nil @user = user @password = password @weight = weight @provider = provider end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
4 5 6 |
# File 'lib/db_url_helper/credentials/credential.rb', line 4 def password @password end |
#provider ⇒ Object
Returns the value of attribute provider.
4 5 6 |
# File 'lib/db_url_helper/credentials/credential.rb', line 4 def provider @provider end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/db_url_helper/credentials/credential.rb', line 4 def user @user end |
#weight ⇒ Object
Returns the value of attribute weight.
4 5 6 |
# File 'lib/db_url_helper/credentials/credential.rb', line 4 def weight @weight end |
Instance Method Details
#<=>(right) ⇒ Object
11 12 13 |
# File 'lib/db_url_helper/credentials/credential.rb', line 11 def <=> right weight <=> right.weight end |