# File lib/rhc/config.rb, line 69
    def self.options_to_config(options, args=OPTIONS.keys)
      OPTIONS.select{|k,v| args ? args.include?(k) : true}.inject([]) do |arr, (name, opts)|
        opts ||= []
        next arr unless opts[2]
        value = options[name]
        arr.concat(opts[2].each_line.to_a.map(&:strip).map{ |s| "# #{s}" })
        arr << "#{value.nil? ? '#' : ''}#{opts[0] || name}=#{self.type_to_config(opts[1], value)}"
        arr << ""
        arr
      end.unshift(!args.nil? && args.length < OPTIONS.length ? 
        ["# Check servers.yml for detailed server configuration", ""] : nil).flatten.compact.join("\n")
    end