Class: AwsReporting::Config
- Inherits:
-
Object
- Object
- AwsReporting::Config
- Defined in:
- lib/aws-reporting/config.rb
Class Method Summary collapse
Class Method Details
.config_file_path ⇒ Object
3 4 5 |
# File 'lib/aws-reporting/config.rb', line 3 def self.config_file_path() File.('~/.aws-reporting/config.yaml') end |
.get ⇒ Object
19 20 21 22 |
# File 'lib/aws-reporting/config.rb', line 19 def self.get() AWS.config(:access_key_id => @@config[:access_key_id], :secret_access_key => @@config[:secret_access_key]) end |
.load ⇒ Object
7 8 9 10 11 |
# File 'lib/aws-reporting/config.rb', line 7 def self.load() @@config = YAML.load(open(config_file_path()){|f| f.read}) rescue raise AwsReporting::Error::ConfigFileLoadError.new end |
.update_region(region) ⇒ Object
13 14 15 16 17 |
# File 'lib/aws-reporting/config.rb', line 13 def self.update_region(region) AWS.config(:access_key_id => @@config[:access_key_id], :secret_access_key => @@config[:secret_access_key], :region => region) end |