Modify ruby client so that apply for enumerations can accept an instance of the class