module Aws::Session::Credentials::FileProvider::IniFileProvider

Mixin to store configuration in an INI file

Public Instance Methods

[](key) click to toggle source
# File lib/aws/session/credentials/file_provider/ini_file_provider.rb, line 7
def [](key)
  read[key.to_s]
end
[]=(key, value) click to toggle source
# File lib/aws/session/credentials/file_provider/ini_file_provider.rb, line 11
def []=(key, value)
  ini_file = read
  ini_file[key.to_s] = value
  ini_file.save
end
read() click to toggle source

@api private @return [IniFile]

# File lib/aws/session/credentials/file_provider/ini_file_provider.rb, line 19
def read
  if File.exist?(path)
    IniFile.load(path)
  else
    IniFile.new(filename: path, encoding: 'UTF-8', permissions: 0600)
  end
end