Sha256: f1f5f011266594308d9f02e476b7644bdba23d4816524fcff982f2acdedaac93
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
# this method adds a new address record def saverwdgutenbergconfiguration require 'fileutils' newname = "rwdgutenberg.cnf" # grab the filename to create newdata =@a_gutenconfigline1.to_s + "\n" + @a_gutenconfigline2.to_s + "\n" + @a_gutenconfigline3.to_s + "\n" + @a_gutenconfigline4.to_s + "\n" + @a_gutenconfigline5.to_s + "\n" + @a_gutenconfigline6.to_s + "\n" + @a_gutenconfigline7.to_s + "\n" + @a_gutenconfigline8.to_s + "\n" + @a_gutenconfigline9.to_s + "\n"+ @a_gutenconfigline10.to_s + "\n"+ @a_gutenconfigline11.to_s + "\n"+ @a_gutenconfigline9.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 & 2 rubygems