Class: WebfleetConnect::Credentials
- Inherits:
-
Object
- Object
- WebfleetConnect::Credentials
- Includes:
- Helpers::EncodingHelper
- Defined in:
- lib/webfleet_connect/credentials.rb
Instance Method Summary collapse
- #auth_header ⇒ Object
-
#initialize(args = {}) ⇒ Credentials
constructor
A new instance of Credentials.
- #to_s ⇒ Object
Methods included from Helpers::EncodingHelper
Constructor Details
#initialize(args = {}) ⇒ Credentials
Returns a new instance of Credentials.
6 7 8 9 10 11 12 |
# File 'lib/webfleet_connect/credentials.rb', line 6 def initialize(args = {}) args = default_arguments.merge(args) @account = args[:account] @username = args[:username] @password = args[:password] @apikey = args[:apikey] end |
Instance Method Details
#auth_header ⇒ Object
14 15 16 |
# File 'lib/webfleet_connect/credentials.rb', line 14 def auth_header "Authorization: Basic #{encode}" end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/webfleet_connect/credentials.rb', line 18 def to_s "#{account}&#{username}&#{password}&#{apikey}" end |