lib/wmap/utils/utils.rb
# Save an array into a file
Save an array into a file
Save an array into a file
def list_2_file (list,file)
		puts "Save list #{list} to plain file #{file}" if @verbose
		begin
			f = File.open(file, "w")
			list.map do |ent|
				f.write("#{ent}\n")
			end
			f.close
		rescue => ee
			puts "Exception on method #{__method__} for file #{file}: #{ee}" if @verbose
			return nil
		end
	end
def list_2_file ( list , file ) puts "Save list #{list} to plain file #{file}" if @verbose begin f = File . open ( file , "w" ) list . map do | ent | f . write ( "#{ent}\n" ) end f . close rescue => ee puts "Exception on method #{__method__} for file #{file}: #{ee}" if @verbose return nil end end
Save an array into a file
Save an array into a file
#ent.strip! # Append the unix line break
list
<not_specific>
file
<not_specific>