In my seeds.rb file I would like to have the following structure:
# begin of variables initialization
groups = ...
# end of variables initializa
You could use END (upper case, not lower case)
END {
# begin of variables initialization
groups = ...
# end of variables initialization
check_data
save_data_in_database
}
but that'd be a bit of a hack.
Basically, END code is run after all other code is run.
Edit: There's also Kernel#at_exit, (rdoc link)