Class: Houston::Adapters::Deployment::Engineyard::Config

Inherits:
EY::Config
  • Object
show all
Defined in:
app/adapters/houston/adapters/deployment/engineyard/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Config

Returns a new instance of Config.



7
8
9
10
11
12
# File 'app/adapters/houston/adapters/deployment/engineyard/config.rb', line 7

def initialize(config)
  @path = Struct.new(:exist?).new(true)
  @config = YAML.load(config) || {} # load_file returns `false' when the file is empty
  raise "ey.yml load error: Expected a Hash but a #{config.class.name} was returned." unless Hash === @config
  @config["environments"] ||= {}
end