Class: Ubiq::Credentials

Inherits:
CredentialsInfo show all
Defined in:
lib/ubiq/credentials.rb

Overview

Class where the credentials can be explicitly set or will use the Environment variables instead

Instance Method Summary collapse

Methods inherited from CredentialsInfo

#set_attributes

Constructor Details

#initialize(papi, sapi, srsa, host) ⇒ Credentials

Returns a new instance of Credentials.



91
92
93
94
95
96
# File 'lib/ubiq/credentials.rb', line 91

def initialize(papi, sapi, srsa, host)
  @access_key_id = papi.present? ? papi : ENV['UBIQ_ACCESS_KEY_ID']
  @secret_signing_key = sapi.present? ? sapi : ENV['UBIQ_SECRET_SIGNING_KEY']
  @secret_crypto_access_key = srsa.present? ? srsa : ENV['UBIQ_SECRET_CRYPTO_ACCESS_KEY']
  @host = host.present? ? host : ENV['UBIQ_SERVER']
end

Instance Method Details

#get_attributesObject



100
101
102
# File 'lib/ubiq/credentials.rb', line 100

def get_attributes
  return @creds
end