Sha256: ca75bf42c6121ffc095cf051f0de7b7f424980878ba97d13c944543f0602d646
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
# def rwdgutenbergcreatebookrecord if @a_gutenbergdatapath.empty? newnotecontent = 'new note' else newnotecontent = @a_gutenbergdatapath.to_s.rstrip+ "\n" + @a_gutenbergdatainfo.to_s + "\n" + @a_gutenbergdatalocation.to_s + "\n" + @a_gutenbergdatalines.to_s + "\n" + @a_gutenbergdataspeed.to_s + "\n" + @a_gutenbergdatacomments.to_s + "\n" end if @a_viewgutenberg.empty? newnotefilename = File.join ($rwdgutenberg_directory , "newnote.lnk") else tmplinkfilename = @a_viewgutenberg.to_s.strip + ".lnk" newnotefilename = File.join($rwdgutenberg_directory, tmplinkfilename) end begin # exception trapped block fd = File.open(newnotefilename,"w") fd.print( newnotecontent) # save the record info to the file fd.close rescue SystemCallError, StandardError $rwdtinkerlog.error "system call error: #{$!}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rwdgutenberg-0.12 | code/superant.com.gutenberg/createnewnote.rb |