# File lib/more/facets/ini.rb, line 223 def Ini.write_to_file(path, inihash={}, comment=nil) raise TypeError, "String expected" unless comment.is_a? String or comment.nil? raise TypeError, "Hash expected" unless inihash.is_a? Hash File.open(path, "w") { |file| unless comment.nil? comment.each do |line| file << "# #{line}" end end file << Ini.to_s(inihash) } end