ads_common/lib/ads_common/config.rb
def load(filename)
      begin
        new_config = YAML::load_file(filename)
        if new_config.kind_of?(Hash)
          @config = new_config
        else
          raise AdsCommon::Errors::Error,
              "Incorrect configuration file: '%s'" % filename
        end
      rescue TypeError => e
        raise AdsCommon::Errors::Error,
            "Error parsing configuration file: '%s' (%s)" % [filename, e]
      end
      return nil
    end
def load(filename)
      begin
        new_config = YAML::load_file(filename)
        if new_config.kind_of?(Hash)
          @config = new_config
        else
          raise AdsCommon::Errors::Error,
              "Incorrect configuration file: '%s'" % filename
        end
      rescue TypeError => e
        raise AdsCommon::Errors::Error,
            "Error parsing configuration file: '%s' (%s)" % [filename, e]
      end
      return nil
    end
Reads a configuration file into instance variable as a Ruby structure with
 the complete set of keys and values.

 Args:
 - filename: config file to be read (*String*)

 Raises:
 - <b>Errno::ENOENT</b> if the file does not exist.