Class: Credential
- Inherits:
-
Object
- Object
- Credential
- Defined in:
- lib/credential.rb
Instance Method Summary collapse
- #access_key_id ⇒ Object
- #aws_credential_file ⇒ Object
-
#initialize(config_file) ⇒ Credential
constructor
A new instance of Credential.
- #secret_access_key ⇒ Object
Constructor Details
#initialize(config_file) ⇒ Credential
Returns a new instance of Credential.
2 3 4 5 6 7 8 |
# File 'lib/credential.rb', line 2 def initialize(config_file) @config = load_yaml_file(config_file) unless aws_credential_file.nil? @config = load_yaml_file(File.(aws_credential_file)) end end |
Instance Method Details
#access_key_id ⇒ Object
14 15 16 |
# File 'lib/credential.rb', line 14 def access_key_id @config['aws_access_key_id'] end |
#aws_credential_file ⇒ Object
18 19 20 |
# File 'lib/credential.rb', line 18 def aws_credential_file @config['aws_credential_file'] end |
#secret_access_key ⇒ Object
10 11 12 |
# File 'lib/credential.rb', line 10 def secret_access_key @config['aws_secret_access_key'] end |