rbs supports type definitions like this one, I.e. a “string” is either a primitive string, or an object implementing #to_str. Wouldn’t such a thing solve your use-case?
rbs supports type definitions like this one, I.e. a “string” is either a primitive string, or an object implementing #to_str. Wouldn’t such a thing solve your use-case?