ruby: add to_s for all generated types