# File lib/rudy/utils.rb, line 251 251: def write_to_file(filename, content, mode, chmod=600) 252: mode = (mode == :append) ? 'a' : 'w' 253: f = File.open(filename,mode) 254: f.puts content 255: f.close 256: return unless Rudy.sysinfo.os == :unix 257: raise "Provided chmod is not a Fixnum (#{chmod})" unless chmod.is_a?(Fixnum) 258: File.chmod(chmod, filename) 259: end