Writing on yaml file??

K

Kamarulnizam Rahim

Hi guys,

Is it possible to write on existing yaml file using ruby programming?
This is because i need to transfer some contents on my .csv file into an
existing yaml which already being used for other purposes. Thank you

Kind Regards,
Nizam
 
P

Phillip Gawlowski

Hi guys,

Is it possible to write on existing yaml file using ruby programming?

Yes. Open it in append mode:
File.open myfile, "a+" do
# stuff
end

See http://www.ruby-doc.org/core/classes/IO.html for a list of modes
File supports.

--
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,814
Members
47,359
Latest member
Claim Bitcoin Earnings. $

Latest Threads

Top