is there any library that can inspect and display what are the arguments that a method takes?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know of any third-party libraries or even RubyGems that can do this reliably. It just isn’t possible to do this kind of inspection given the limited reflection facilities Ruby provides.
You will have to make do with what is available in the core library, which is basically
Method#parameters: