Sha256: 53110e8c563b0ae046cb63445a0d815b28b40d3238ed2bd5713fca02701ce640
Contents?: true
Size: 655 Bytes
Versions: 10
Compression:
Stored size: 655 Bytes
Contents
def saverubyrecord # this method adds a new script file require 'fileutils' if @a_rubyscriptfilename newdata =@a_rubyscriptrecord.to_s fullnewname = @a_rubyscriptfilename.to_s + ".rb" 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 @newrubyresult=newdata # show the record info in the browser rescue @newrubyresult = "\n" + "system error in createnew method" end # exception rescue end end # end of createnew
Version data entries
10 entries across 10 versions & 3 rubygems