New to Ruby and would like to the following in Ruby
Read row
save the entire row (maybe zip it).
process.....
Receive user changes.
reread the row for update
compare the row to the saved row for changes
if no changes update the row
if changes error message to user, info has changed.
Not sure I understand the question. A "row" of what? Database table date, chess board pieces, pixels, or something else?
Also, what have you tried? Where are you running into difficulties?
James Edward Gray II
···
On Jul 1, 2005, at 3:25 PM, bww00amdahl@yahoo.com wrote:
New to Ruby and would like to the following in Ruby
Read row
save the entire row (maybe zip it).
process.....
Receive user changes.
reread the row for update
compare the row to the saved row for changes
if no changes update the row
if changes error message to user, info has changed.
There are lots of database APIs for Ruby out there. Are you looking for some links?
As far as serialization goes, there's a Marshal class in the Ruby stdlibs, but you're welcome to implement your own. You could also write to YAML, or use a lib like AMarshal to store the Ruby object itself:
Well, you should probably examine the DBI for the database work. Comparing rows is a trivial programming task. You mentioned user input, I think a library like HighLine makes that a lot easier.
Hope that gets you going. Feel free to ask questions if you get stuck...
James Edward Gray II
···
On Jul 3, 2005, at 8:35 PM, bww00amdahl@yahoo.com wrote:
Thanks,
I have done this in other languages and was looking for some direction,
or if it had been done in ruby before , the ruby code.