Class: Reyes::Config
- Inherits:
-
Object
- Object
- Reyes::Config
- Defined in:
- lib/reyes/config.rb
Instance Method Summary collapse
- #aws_config ⇒ Object
- #aws_credentials ⇒ Object
- #config ⇒ Object
-
#initialize(path = nil) ⇒ Config
constructor
A new instance of Config.
- #reyes_config ⇒ Object
Constructor Details
#initialize(path = nil) ⇒ Config
Returns a new instance of Config.
5 6 7 |
# File 'lib/reyes/config.rb', line 5 def initialize(path=nil) @path = path || File.('../../../config.yaml', __FILE__) end |
Instance Method Details
#aws_config ⇒ Object
9 10 11 |
# File 'lib/reyes/config.rb', line 9 def aws_config config.fetch('aws') end |
#aws_credentials ⇒ Object
13 14 15 |
# File 'lib/reyes/config.rb', line 13 def aws_credentials aws_config.fetch('credentials') end |
#config ⇒ Object
21 22 23 |
# File 'lib/reyes/config.rb', line 21 def config @config ||= YAML.load_file(@path) end |
#reyes_config ⇒ Object
17 18 19 |
# File 'lib/reyes/config.rb', line 17 def reyes_config config.fetch('reyes') end |