api_generator:cpp: support ruby methods and lambda as callbacks