Class: GreenGoose::Credentials::Basic
- Inherits:
-
Object
- Object
- GreenGoose::Credentials::Basic
- Defined in:
- lib/greengoose/credentials/basic.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #configure_connection(connection) ⇒ Object
-
#initialize(username, password) ⇒ Basic
constructor
A new instance of Basic.
Constructor Details
#initialize(username, password) ⇒ Basic
Returns a new instance of Basic.
6 7 8 9 |
# File 'lib/greengoose/credentials/basic.rb', line 6 def initialize(username, password) @username = username @password = password end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
4 5 6 |
# File 'lib/greengoose/credentials/basic.rb', line 4 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
4 5 6 |
# File 'lib/greengoose/credentials/basic.rb', line 4 def username @username end |
Instance Method Details
#configure_connection(connection) ⇒ Object
11 12 13 |
# File 'lib/greengoose/credentials/basic.rb', line 11 def configure_connection(connection) connection.basic_auth(username, password) end |