ruby client: support blocks for the payload