06 Feb 2013, 19:30
Leo-1_pragsmall

Leonel Santos (11 posts)

I downloaded the files and since the book and the downloaded code are very different from each other, I tried to make my code look more like the downloaded code. I tried to use the code on play_well/db_backup_3.rb and tried the –iteration flag and it doesn’t work.

I look in the code and the iteration flag can be set but there seems to be no place where the iteration flag is used. Am I doing something wrong or is the downloaded code wrong?

08 Feb 2013, 19:37
Dmfcb_pragsmall

David Copeland (98 posts)

This seems to be an omission in the code - I was purposefully trying to avoid too much logic unrelated to command-line techniques, and never ended up showing how to use that flag. I believe it would’ve been something like this:

database_name = ARGV[0]
iteration = options[:iteration] ? '-iter' : ''
output_file = "#{database_name}#{iteration}.sql"
  You must be logged in to comment