ohana ohana - 1 year ago 87
Ruby Question

How to write to file in Ruby?

I need to read the data out of database and then save it in a text file.

How can I do that in Ruby? Is there any file management system in Ruby?

jdl jdl
Answer Source

The Ruby File class will give you the ins and outs of ::new and ::open but its parent, the IO class, gets into the depth of #read and #write.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download