putting code in a ruby block to delay execution