implementation example using ruby