Method: Opsmgr::Environments.for

Defined in:
lib/opsmgr/environments.rb

.for(name = '') ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/opsmgr/environments.rb', line 12

def self.for(name = '')
  env_config = config_file(directory, config_filename(name))
  unless File.exist?(env_config)
    raise "No environments config found in #{env_config}. Specify path using ENV_DIRECTORY or ENV_CONFIG_FILE."
  end

  new(env_config, name)
end