def environment(name)
      yaml_path = yaml_path_if_exists(name)
      rb_path = rb_path_if_exists(name)

      raise "found multiple env files for same env #{name}." if !yaml_path.nil? && !rb_path.nil?
      raise "TODO: implement Ruby environments." unless rb_path.nil?

      env = Environments::Environment.load_yaml_file(yaml_path) unless yaml_path.nil?

      raise "no env found for '#{name}'." if env.nil?

      IceNine.deep_freeze(env)
      env
    end
def environment(name)
      yaml_path = yaml_path_if_exists(name)
      rb_path = rb_path_if_exists(name)

      raise "found multiple env files for same env #{name}." if !yaml_path.nil? && !rb_path.nil?
      raise "TODO: implement Ruby environments." unless rb_path.nil?

      env = Environments::Environment.load_yaml_file(yaml_path) unless yaml_path.nil?

      raise "no env found for '#{name}'." if env.nil?

      IceNine.deep_freeze(env)
      env
    end
TODO: cache environments (but make configurable)