Class: Deployme::Config
- Inherits:
-
Object
- Object
- Deployme::Config
- Defined in:
- lib/deployme/config.rb
Defined Under Namespace
Classes: Context
Instance Method Summary collapse
-
#initialize(options:) ⇒ Config
constructor
A new instance of Config.
- #load ⇒ Object
Constructor Details
#initialize(options:) ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/deployme/config.rb', line 6 def initialize(options:) = end |
Instance Method Details
#load ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/deployme/config.rb', line 10 def load file = File.join(.directory, "#{options.environment}.yml") raise "Cannot find environment #{file}" unless File.exist?(file) Util.deep_symbolize_keys(YAML.load(ERB.new(File.read(file)).result(Context.with()))) end |