See the Ruby API for cucumber-jruby.