Given a class, see if instance has method (Ruby)

前端 未结 12 1841

I know in Ruby that I can use respond_to? to check if an object has a certain method.

But, given the class, how can I check if the instance has a certai

12条回答
提交回复
热议问题