Method: Dbmanager::YmlParser#environments
- Defined in:
- lib/dbmanager/yml_parser.rb
#environments ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/dbmanager/yml_parser.rb', line 24 def environments @environments ||= begin yml_sorted_envs.each_with_object(ActiveSupport::OrderedHash.new) do |arr, hash| env_name, env_config = arr[0], arr[1] begin hash[env_name] = Environment.new env_config.merge(:name => env_name) rescue NoMethodError raise YmlInvalidError, (env_name, env_config) end end end end |