ruby client: extract classes into separated files