added ruby implementation of composite