Class: Reyes::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/reyes/config.rb

Instance Method Summary collapse

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.expand_path('../../../config.yaml', __FILE__)
end

Instance Method Details

#aws_configObject



9
10
11
# File 'lib/reyes/config.rb', line 9

def aws_config
  config.fetch('aws')
end

#aws_credentialsObject



13
14
15
# File 'lib/reyes/config.rb', line 13

def aws_credentials
  aws_config.fetch('credentials')
end

#configObject



21
22
23
# File 'lib/reyes/config.rb', line 21

def config
  @config ||= YAML.load_file(@path)
end

#reyes_configObject



17
18
19
# File 'lib/reyes/config.rb', line 17

def reyes_config
  config.fetch('reyes')
end