The Ruby Scripting add-on allows you to integrate Ruby scripts in ZAP. It’s bundled JRuby 1.7.4.
When you create a new script you will be given the option to use Ruby, as well as the option to choose from various Ruby templates.