Updated code sample to be ruby