recursive attribute setting for ruby objects