updated code example placement; added ruby examples