Class: R53z::Config
- Inherits:
-
Object
- Object
- R53z::Config
- Includes:
- Methadone::CLILogging, Methadone::Main
- Defined in:
- lib/r53z/config.rb
Instance Attribute Summary collapse
-
#creds ⇒ Object
readonly
Returns the value of attribute creds.
Instance Method Summary collapse
- #[](param) ⇒ Object
-
#initialize(config_file = nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config_file = nil) ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 14 15 |
# File 'lib/r53z/config.rb', line 9 def initialize(config_file=nil) unless config_file # Default to ~/.aws/credentials config_file = File.join(ENV['HOME'], ".aws/credentials") end @creds = IniFile.load(config_file) end |
Instance Attribute Details
#creds ⇒ Object (readonly)
Returns the value of attribute creds.
7 8 9 |
# File 'lib/r53z/config.rb', line 7 def creds @creds end |
Instance Method Details
#[](param) ⇒ Object
17 18 19 |
# File 'lib/r53z/config.rb', line 17 def [](param) return self.creds[param] end |