Sha256: 464d297f32342279493909d1b3ccf64dfd209b2a0f1d667b667bfd0967376e68
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
# this method adds a new address record def saverubyslippersconfiguration require 'fileutils' newname = "rubyslippers.cnf" # grab the filename to create newdata =@a_rsconfigline1.to_s + "\n" + @a_rsconfigline2.to_s + "\n" + @a_rsconfigline3.to_s + "\n" + @a_rsconfigline4.to_s + "\n" + @a_rsconfigline5.to_s + "\n" + @a_rsconfigline6.to_s + "\n" + @a_rsconfigline7.to_s + "\n" + @a_rsconfigline8.to_s + "\n" + @a_rsconfigline9.to_s + "\n"+ @a_rsconfigline10.to_s + "\n"+ @a_rsconfigline11.to_s + "\n"+ @a_rsconfigline12.to_s + "\n"+ @a_rsconfigline13.to_s + "\n"+ @a_rsconfigline14.to_s + "\n"+ @a_rsconfigline15.to_s + "\n"+ @a_rsconfigline16.to_s + "\n" begin # exception trapped block fileName = File.join( ConfigurationDir, newname ) fd = File.open(fileName,"w") fd.print(newdata) # save the record info to the file fd.close @newconfigurationresult=newdata # show the record info in the browser rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end
Version data entries
4 entries across 4 versions & 1 rubygems