How do we use Stream UDFs from Ruby

How do we use Stream UDFs from Ruby? execute_udf seems to work call Record UDF.

UPDATE: I guess I have found (but correct me if I am wrong). We use query(statement, options = {}) ⇒ Object and specify info about UDF in the statement.

Can you please provide the reference for the query() statement for use with stream UDFs? Thanks!

Look here in API documentation. But I write back when I come up with a full working example. I will post it as the Part 3 of my tutorial.