Hey guys,
What would be the best way to create and write to a file? Thanks.
Depends what you’re writing and to where. To create and write to a
simple text file is easy:
File.open(‘filename’,‘w’) { |f|
f.puts ‘text to write to file’
}
On Nov 16, 2:47 pm, Eamon F. [email protected]
François Montel wrote:
Depends what you’re writing and to where. To create and write to a
simple text file is easy:File.open(‘filename’,‘w’) { |f|
f.puts ‘text to write to file’
}On Nov 16, 2:47 pm, Eamon F. [email protected]
Cool, thanks. That’s all I need.