2 ms·
I think the main two solutions here are introspection and a little TDD. `methodswith` tells you all methods that been defined on a type. Since it returns an ar
by ivirshup 8y ago
I think the main two solutions here are introspection and a little TDD.
`methodswith` tells you all methods that been defined on a type. Since it returns an array of methods you can do some more introspection on that, if you're so inclined.
I've also just written a few test cases using the interface I'd like, then worked on methods until my tests pass (which can be just not throwing MethodErrors).