# How to find existence of method in ruby class?

**URL:** <https://www.ruby-forum.com/t/how-to-find-existence-of-method-in-ruby-class/126914>\
**Category:** Ruby\
**Created:** [January 23, 2008, 12:35pm UTC](https://www.ruby-forum.com/t/how-to-find-existence-of-method-in-ruby-class/126914 "2008-01-23T12:35:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag\_mistry\_ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Post date:** [January 23, 2008, 12:35pm UTC](https://www.ruby-forum.com/t/how-to-find-existence-of-method-in-ruby-class/126914/1 "2008-01-23T12:35:32Z")

</div>

Hi

We can define method in Ruby class using â€œrb\_define\_methodâ€ C API in C  
application. We can also call that method using â€œrb\_funcall2â€ or  
â€œrb\_funcall3â€ C APIs. How do I know whether method with given name is  
defined or not in Ruby class? Is there any C API to find whether method  
with given name is defined or not in the Ruby class?
