class Aws::Session::Credentials::CredentialFile
Holds credentials that are read by AWS SDKs
Attributes
path[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/aws/session/credentials/credential_file.rb, line 11 def initialize(options = {}) @path = File.expand_path(options[:path] || default_path) end
Public Instance Methods
default_path()
click to toggle source
# File lib/aws/session/credentials/credential_file.rb, line 15 def default_path File.join(%w(~ .aws credentials)) end
profiles_hash()
click to toggle source
@return [Hash<String,Hash>]
# File lib/aws/session/credentials/credential_file.rb, line 20 def profiles_hash read.to_h end
profiles_hash=(hsh)
click to toggle source
@param [Hash<String,Hash>] prfs
# File lib/aws/session/credentials/credential_file.rb, line 25 def profiles_hash=(hsh) hsh.each { |key, value| self[key] = value } end