Small refactor for RubyMethod.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>