Sha256: b3e514baffdb789ba8e6a9c463360cceb7431aecbf443cf64c40b200966fb149
Contents?: true
Size: 778 Bytes
Versions: 24
Compression:
Stored size: 778 Bytes
Contents
def savescriptrecord # this method adds a new script file require 'fileutils' if @a_tmpscriptfilename newdata =@a_scriptfirstline.to_s + "\n #" + @a_scriptcommentline.to_s + "\n" fullnewname = @a_tmpscriptfilename.to_s + ".sh" begin # exception trapped block fileName = File.join( $shellscript_directory, fullnewname ) fd = File.open(fileName,"w") fd.print(newdata) # save the record info to the file fd.close @newdisplay=newdata # show the record info in the browser $currentscriptname = "%s" % [@a_tmpscriptfilename] # grab the new filename to create rescue @newdisplay = "\n" + "system error in createnew method" end # exception rescue end end # end of createnew
Version data entries
24 entries across 24 versions & 4 rubygems