KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 certain method? i.e, something like Foo.new.respond_to?(:bar) But I feel like there's gotta be a better way than instantiating a new instance.
Tags (comma-separated)
Save Edits
Cancel